[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>
This commit is contained in:
parent
81684ee645
commit
066bb8d03b
|
@ -787,7 +787,6 @@ int ipmi_destroy_user(ipmi_user_t user)
|
||||||
int i;
|
int i;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct cmd_rcvr *rcvr;
|
struct cmd_rcvr *rcvr;
|
||||||
struct list_head *entry1, *entry2;
|
|
||||||
struct cmd_rcvr *rcvrs = NULL;
|
struct cmd_rcvr *rcvrs = NULL;
|
||||||
|
|
||||||
user->valid = 1;
|
user->valid = 1;
|
||||||
|
@ -812,8 +811,7 @@ int ipmi_destroy_user(ipmi_user_t user)
|
||||||
* synchronize_rcu()) then free everything in that list.
|
* synchronize_rcu()) then free everything in that list.
|
||||||
*/
|
*/
|
||||||
down(&intf->cmd_rcvrs_lock);
|
down(&intf->cmd_rcvrs_lock);
|
||||||
list_for_each_safe_rcu(entry1, entry2, &intf->cmd_rcvrs) {
|
list_for_each_entry_rcu(rcvr, &intf->cmd_rcvrs, link) {
|
||||||
rcvr = list_entry(entry1, struct cmd_rcvr, link);
|
|
||||||
if (rcvr->user == user) {
|
if (rcvr->user == user) {
|
||||||
list_del_rcu(&rcvr->link);
|
list_del_rcu(&rcvr->link);
|
||||||
rcvr->next = rcvrs;
|
rcvr->next = rcvrs;
|
||||||
|
|
Loading…
Reference in New Issue