diff options
author | Paul E. McKenney <paulmck@us.ibm.com> | 2006-01-06 03:19:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:58 -0500 |
commit | 066bb8d03b6e52e4844d37145573d6a2bedaa339 (patch) | |
tree | cdef785ca23e7803573ac774ab9750bb83a672c9 /drivers/char/ipmi | |
parent | 81684ee645e15601ec935461d9069a3086179c06 (diff) |
[PATCH] fix remaining list_for_each_safe_rcu in -mm (take 2)
I missed a use of list_for_each_rcu_safe() in -mm tree. Here is an updated
patch to fix it. This time tested on a machine that actually uses IPMI...
(Thanks to Serge Hallyn for spotting this.)
Signed-off-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 1f56b4cf0f58..561430ed94af 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -787,7 +787,6 @@ int ipmi_destroy_user(ipmi_user_t user) | |||
787 | int i; | 787 | int i; |
788 | unsigned long flags; | 788 | unsigned long flags; |
789 | struct cmd_rcvr *rcvr; | 789 | struct cmd_rcvr *rcvr; |
790 | struct list_head *entry1, *entry2; | ||
791 | struct cmd_rcvr *rcvrs = NULL; | 790 | struct cmd_rcvr *rcvrs = NULL; |
792 | 791 | ||
793 | user->valid = 1; | 792 | user->valid = 1; |
@@ -812,8 +811,7 @@ int ipmi_destroy_user(ipmi_user_t user) | |||
812 | * synchronize_rcu()) then free everything in that list. | 811 | * synchronize_rcu()) then free everything in that list. |
813 | */ | 812 | */ |
814 | down(&intf->cmd_rcvrs_lock); | 813 | down(&intf->cmd_rcvrs_lock); |
815 | list_for_each_safe_rcu(entry1, entry2, &intf->cmd_rcvrs) { | 814 | list_for_each_entry_rcu(rcvr, &intf->cmd_rcvrs, link) { |
816 | rcvr = list_entry(entry1, struct cmd_rcvr, link); | ||
817 | if (rcvr->user == user) { | 815 | if (rcvr->user == user) { |
818 | list_del_rcu(&rcvr->link); | 816 | list_del_rcu(&rcvr->link); |
819 | rcvr->next = rcvrs; | 817 | rcvr->next = rcvrs; |