kernel_optimize_test/drivers/video/logo
Tomi Valkeinen 92b004d1aa video/logo: prevent use of logos after they have been freed
If the probe of an fb driver has been deferred due to missing
dependencies, and the probe is later ran when a module is loaded, the
fbdev framework will try to find a logo to use.

However, the logos are __initdata, and have already been freed. This
causes sometimes page faults, if the logo memory is not mapped,
sometimes other random crashes as the logo data is invalid, and
sometimes nothing, if the fbdev decides to reject the logo (e.g. the
random value depicting the logo's height is too big).

This patch adds a late_initcall function to mark the logos as freed. In
reality the logos are freed later, and fbdev probe may be ran between
this late_initcall and the freeing of the logos. In that case we will
miss drawing the logo, even if it would be possible.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: stable@vger.kernel.org
2014-12-29 10:06:55 +02:00
..
.gitignore
clut_vga16.ppm
Kconfig
logo_blackfin_clut224.ppm
logo_blackfin_vga16.ppm
logo_dec_clut224.ppm
logo_linux_clut224.ppm
logo_linux_mono.pbm
logo_linux_vga16.ppm
logo_m32r_clut224.ppm
logo_mac_clut224.ppm
logo_parisc_clut224.ppm
logo_sgi_clut224.ppm
logo_spe_clut224.ppm
logo_sun_clut224.ppm
logo_superh_clut224.ppm
logo_superh_mono.pbm
logo_superh_vga16.ppm
logo.c
Makefile