]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix rcu use in ip_route_output_slow
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 23 Sep 2010 21:46:03 +0000 (21:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 02:04:07 +0000 (19:04 -0700)
commitc0fb99f2c4ac89bb0acb22636879228191d69685
tree4e2606d19e0e5be3e1fc1851a0294f163bfa8780
parent752687907177dfcb02b86935d3f4e9c51228ce8c
net: fix rcu use in ip_route_output_slow

__in_dev_get_rtnl(dev_out) is called while RTNL is not held, thus
triggers a lockdep fault.

At this point, we only perform a raw test of dev_out->ip_ptr being NULL,
we dont need to make sure ip_ptr cant changed right after.

We can use rcu_dereference_raw() for this.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c