* [PATCH 3/6] UML - Fix device unplug crash
@ 2007-03-27 18:27 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2007-03-27 18:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel
Fix a NULL dereference when unplugging a device. The default value of
err_msg wants to be "" in case the driver doesn't modify it.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
arch/um/drivers/mconsole_kern.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6.21-mm/arch/um/drivers/mconsole_kern.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/drivers/mconsole_kern.c 2007-03-27 11:35:47.000000000 -0400
+++ linux-2.6.21-mm/arch/um/drivers/mconsole_kern.c 2007-03-27 11:46:28.000000000 -0400
@@ -614,6 +614,9 @@ void mconsole_remove(struct mc_request *
err_msg = NULL;
err = (*dev->remove)(n, &err_msg);
switch(err){
+ case 0:
+ err_msg = "";
+ break;
case -ENODEV:
if(err_msg == NULL)
err_msg = "Device doesn't exist";
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-27 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 18:27 [PATCH 3/6] UML - Fix device unplug crash Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox