]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] Fix crash in unregister_console()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 23 Nov 2005 21:37:44 +0000 (13:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 24 Nov 2005 00:08:39 +0000 (16:08 -0800)
commite9b15b54d3646108bbd3e054158b402025d3e704
tree4e12028b9fd62fc13ad66d047f5d0052c2208e96
parent962b564cf1ec8041e8890a3c3847e3a630a08f42
[PATCH] Fix crash in unregister_console()

If unregister_console() is inadvertently called while no consoles are
registered, it will crash trying to dereference NULL pointer.  It is
necessary to fix that because register_console() provides no indication
that it actually registered the console passed in.  In fact, it may well
decide not to register it based on various things...

(akpm: It'd be better to make register_console() return something and fix the
callers.  All 106 of them...)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/printk.c