From: Corey Minyard Date: Fri, 1 Sep 2006 04:27:45 +0000 (-0700) Subject: [PATCH] IPMI: fix occasional oops on module unload X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a9eec55623f5aedfcef745d3a0e0f97f5d4f74be;p=linux-beck.git [PATCH] IPMI: fix occasional oops on module unload Olaf Kirch of SuSE tracked down a problem where module unloads of the IPMI driver would occasionally result in Oopses. He tracked that down to a variable that wasn't always initialized properly in some situations. This patch initializes that variable. Olaf sent a patch that kzalloc-ed the data, but this structure is large enough that I would perfer to not do that. Thanks Olaf! Signed-off-by: Corey Minyard Cc: Olaf Kirch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 0aa5d608fe6f..843d34c8627c 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3428,6 +3428,7 @@ struct ipmi_recv_msg *ipmi_alloc_recv_msg(void) rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC); if (rv) { + rv->user = NULL; rv->done = free_recv_msg; atomic_inc(&recv_msg_inuse_count); }