Thread (3 messages) 3 messages, 3 authors, 2011-01-27

Re: [PATCH net-next-2.6] net: fix dev_seq_next()

flat view

From: David Miller <davem@davemloft.net>
Date: 2011-01-27 22:22:07

From: Eric Dumazet <redacted>
Date: Thu, 27 Jan 2011 05:08:02 +0100
[PATCH net-next-2.6] net: fix dev_seq_next()

Commit c6d14c84566d (net: Introduce for_each_netdev_rcu() iterator)
added a race in dev_seq_next().

The rcu_dereference() call should be done _before_ testing the end of
list, or we might return a wrong net_device if a concurrent thread
changes net_device list under us.

Note : discovered thanks to a sparse warning :

net/core/dev.c:3919:9: error: incompatible types in comparison expression
(different address spaces)

Signed-off-by: Eric Dumazet <redacted>
CC: Paul E. McKenney <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help