diff options
author | Dimitris Michailidis <dm@chelsio.com> | 2010-10-07 10:48:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-08 13:51:08 -0400 |
commit | 8391d07b80e8da957cd888870e23f8e218438622 (patch) | |
tree | 8baab40bff5649b1f777af590f77a79a549b0491 | |
parent | 993284dfff3ba4643f08b592427d0ac758d30156 (diff) |
ipv4: Remove leftover rcu_read_unlock calls from __mkroute_output()
Commit "fib: RCU conversion of fib_lookup()" removed rcu_read_lock() from
__mkroute_output but left a couple of calls to rcu_read_unlock() in there.
This causes lockdep to complain that the rcu_read_unlock() call in
__ip_route_output_key causes a lock inbalance and quickly crashes the
kernel. The below fixes this for me.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 7864d0c48968..3888f6ba0a5c 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2396,12 +2396,10 @@ static int __mkroute_output(struct rtable **result, | |||
2396 | 2396 | ||
2397 | 2397 | ||
2398 | rth = dst_alloc(&ipv4_dst_ops); | 2398 | rth = dst_alloc(&ipv4_dst_ops); |
2399 | if (!rth) { | 2399 | if (!rth) |
2400 | rcu_read_unlock(); | ||
2401 | return -ENOBUFS; | 2400 | return -ENOBUFS; |
2402 | } | 2401 | |
2403 | in_dev_hold(in_dev); | 2402 | in_dev_hold(in_dev); |
2404 | rcu_read_unlock(); | ||
2405 | rth->idev = in_dev; | 2403 | rth->idev = in_dev; |
2406 | 2404 | ||
2407 | atomic_set(&rth->dst.__refcnt, 1); | 2405 | atomic_set(&rth->dst.__refcnt, 1); |