* [PATCH net-2.6] net: use hlist_del_rcu() in dev_change_name()
@ 2011-05-17 16:21 Eric Dumazet
2011-05-17 17:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2011-05-17 16:21 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Using plain hlist_del() in dev_change_name() is wrong since a
concurrent reader can crash trying to dereference LIST_POISON1.
Bug introduced in commit 72c9528bab94 (net: Introduce
dev_get_by_name_rcu())
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
Stable candidate, for 2.6.33+
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index b624fe4..30a4078 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1007,7 +1007,7 @@ rollback:
}
write_lock_bh(&dev_base_lock);
- hlist_del(&dev->name_hlist);
+ hlist_del_rcu(&dev->name_hlist);
write_unlock_bh(&dev_base_lock);
synchronize_rcu();
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-2.6] net: use hlist_del_rcu() in dev_change_name()
2011-05-17 16:21 [PATCH net-2.6] net: use hlist_del_rcu() in dev_change_name() Eric Dumazet
@ 2011-05-17 17:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-05-17 17:57 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 17 May 2011 18:21:00 +0200
> Using plain hlist_del() in dev_change_name() is wrong since a
> concurrent reader can crash trying to dereference LIST_POISON1.
>
> Bug introduced in commit 72c9528bab94 (net: Introduce
> dev_get_by_name_rcu())
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-17 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 16:21 [PATCH net-2.6] net: use hlist_del_rcu() in dev_change_name() Eric Dumazet
2011-05-17 17:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).