summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2006-11-09 02:44:52 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-09 03:29:24 +0100
commitf3ce6a0ead8c557e9acdc733addd23cbc206c7e3 (patch)
treeba96756e66d8a84c4ca2b07b8f8f379dcaf3e15a /drivers
parent[PATCH] sysctl: Undeprecate sys_sysctl (diff)
downloadlinux-f3ce6a0ead8c557e9acdc733addd23cbc206c7e3.tar.xz
linux-f3ce6a0ead8c557e9acdc733addd23cbc206c7e3.zip
[PATCH] IPMI: Clean up the waiting message queue properly on unload
A wrong function was being used to free a list; this fixes the problem. Otherwise, an oops at unload time was possible. But not likely, since you can't have any users when you unload the modules and it is very hard to get messages into this queue without users. Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Patrick Schoeller <Patrick.Schoeller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 34a4fd13fa81..e55a0d276729 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -376,13 +376,23 @@ static void free_recv_msg_list(struct list_head *q)
}
}
+static void free_smi_msg_list(struct list_head *q)
+{
+ struct ipmi_smi_msg *msg, *msg2;
+
+ list_for_each_entry_safe(msg, msg2, q, link) {
+ list_del(&msg->link);
+ ipmi_free_smi_msg(msg);
+ }
+}
+
static void clean_up_interface_data(ipmi_smi_t intf)
{
int i;
struct cmd_rcvr *rcvr, *rcvr2;
struct list_head list;
- free_recv_msg_list(&intf->waiting_msgs);
+ free_smi_msg_list(&intf->waiting_msgs);
free_recv_msg_list(&intf->waiting_events);
/* Wholesale remove all the entries from the list in the