Re: bug: keep_bootcon and early printk together can lead to (invisible) kernel panic
On Thu, Feb 21, 2013 at 03:37:17PM +0100, Patrik, Kluba wrote: > I had a silent lockup on one of our embedded system under development. > It was not easy to track it down, so here's what I discovered, in case > somebody runs into similar trouble. > Using 'keep_bootcon' command line parameter, and enabling early printk > can lead to a kernel panic. At least on MIPS, it does. The problem is > that in arch/mips/kernel/early_printk.c everything is declared as > __init and __initdata, so they are being freed, when the kernel > frees .init.* sections. If 'keep_bootcon' is given, the early console > does not get unregistered, and the entry in the console_drivers list > can point (will, believe me) to garbage data. It's up to you to imagine > the effects... I also ran into this recently, this should fix it: http://marc.info/?l=linux-kernel=136062078931024=2 A. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
bug: keep_bootcon and early printk together can lead to (invisible) kernel panic
Hi! I had a silent lockup on one of our embedded system under development. It was not easy to track it down, so here's what I discovered, in case somebody runs into similar trouble. Using 'keep_bootcon' command line parameter, and enabling early printk can lead to a kernel panic. At least on MIPS, it does. The problem is that in arch/mips/kernel/early_printk.c everything is declared as __init and __initdata, so they are being freed, when the kernel frees .init.* sections. If 'keep_bootcon' is given, the early console does not get unregistered, and the entry in the console_drivers list can point (will, believe me) to garbage data. It's up to you to imagine the effects... Regards, Patrik -- Patrik KLUBA Software Developer at DENSION Audio Systems Ltd. H-1116 Budapest, Sztregova u. 1 Phone: +36 1 463 0470 Fax: +36 1 463 0479 Web: www.dension.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
bug: keep_bootcon and early printk together can lead to (invisible) kernel panic
Hi! I had a silent lockup on one of our embedded system under development. It was not easy to track it down, so here's what I discovered, in case somebody runs into similar trouble. Using 'keep_bootcon' command line parameter, and enabling early printk can lead to a kernel panic. At least on MIPS, it does. The problem is that in arch/mips/kernel/early_printk.c everything is declared as __init and __initdata, so they are being freed, when the kernel frees .init.* sections. If 'keep_bootcon' is given, the early console does not get unregistered, and the entry in the console_drivers list can point (will, believe me) to garbage data. It's up to you to imagine the effects... Regards, Patrik -- Patrik KLUBA Software Developer at DENSION Audio Systems Ltd. H-1116 Budapest, Sztregova u. 1 Phone: +36 1 463 0470 Fax: +36 1 463 0479 Web: www.dension.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: bug: keep_bootcon and early printk together can lead to (invisible) kernel panic
On Thu, Feb 21, 2013 at 03:37:17PM +0100, Patrik, Kluba wrote: I had a silent lockup on one of our embedded system under development. It was not easy to track it down, so here's what I discovered, in case somebody runs into similar trouble. Using 'keep_bootcon' command line parameter, and enabling early printk can lead to a kernel panic. At least on MIPS, it does. The problem is that in arch/mips/kernel/early_printk.c everything is declared as __init and __initdata, so they are being freed, when the kernel frees .init.* sections. If 'keep_bootcon' is given, the early console does not get unregistered, and the entry in the console_drivers list can point (will, believe me) to garbage data. It's up to you to imagine the effects... I also ran into this recently, this should fix it: http://marc.info/?l=linux-kernelm=136062078931024w=2 A. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/