]> err.no Git - linux-2.6/commitdiff
[PATCH] IPMI: fix occasional oops on module unload
authorCorey Minyard <minyard@acm.org>
Fri, 1 Sep 2006 04:27:45 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 1 Sep 2006 18:39:09 +0000 (11:39 -0700)
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 <minyard@acm.org>
Cc: Olaf Kirch <okir@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/ipmi/ipmi_msghandler.c

index 0aa5d608fe6f539aa6eb2bbb84ba7e52e3dbc05a..843d34c8627c38d3a72889557f216513bc9fe638 100644 (file)
@@ -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);
        }