Thread (5 messages) 5 messages, 2 authors, 2013-12-20

Re: [PATCH] video/logo: don't look for the logo after system boot

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2013-12-20 15:27:07

On Fri, Dec 20, 2013 at 3:24 PM, Sebastian Andrzej Siewior
[off-list ref] wrote:
If the primary GPU driver has been loaded _after_ system as a module
then this logo memory is no longer valid.
Managed to crash the system by booting a box without a GPU and then
hotpluggin => BOOM.
Which GPU driver is this?

drivers/video/fbmem.c:fb_prepare_logo() has protection against this:

        if (info->flags & FBINFO_MISC_TILEBLITTING ||
            info->flags & FBINFO_MODULE)
                return 0;
quoted hunk ↗ jump to hunk
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/video/logo/logo.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c
index 080c35b..a26bb16 100644
--- a/drivers/video/logo/logo.c
+++ b/drivers/video/logo/logo.c
@@ -36,6 +36,9 @@ const struct linux_logo * __init_refok fb_find_logo(int depth)
        if (nologo)
                return NULL;

+       if (system_state != SYSTEM_BOOTING)
+               return NULL;
+
        if (depth >= 1) {
 #ifdef CONFIG_LOGO_LINUX_MONO
                /* Generic Linux logo */
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help