remove leftover rcu_read_unlock calls from __mkroute_output
Subsystems (3)
PATCH 1/1 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.
--- net/ipv4/route.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
net/ipv4/route.c +2 -4
@@ -2396,12 +2396,10 @@ static int __mkroute_output(struct rtable **result, rth =dst_alloc (&ipv4_dst_ops); -if (!rth) { -rcu_read_unlock (); +if (!rth)return -ENOBUFS ; - } +in_dev_hold (in_dev); -rcu_read_unlock (); rth->idev = in_dev;atomic_set (&rth->dst.__refcnt,1 );
Signature · 1 line
1.5.4
Quoted 7 lines · Dimitris Michailidis
Commit "fib: RCU conversion of
fib_lookup()" removedrcu_read_lock()from__mkroute_outputbut left a couple of calls torcu_read_unlock()in there. This causes lockdep to complain that thercu_read_unlock()call in__ip_route_output_keycauses a lock inbalance and quickly crashes the kernel. The below fixes this for me.Signed-off-by Dimitris Michailidis <[email protected]>
Thanks Dimitris !
From: Eric Dumazet <[email protected]>
Date: Fri, 08 Oct 2010 06:47:58 +0200
Quoted 10 lines · Dimitris Michailidis
Quoted 7 lines
Commit "fib: RCU conversion of
fib_lookup()" removedrcu_read_lock()from__mkroute_outputbut left a couple of calls torcu_read_unlock()in there. This causes lockdep to complain that thercu_read_unlock()call in__ip_route_output_keycauses a lock inbalance and quickly crashes the kernel. The below fixes this for me.Signed-off-by Dimitris Michailidis <[email protected]>Acked-by Eric Dumazet <[email protected]>
Applied, thanks everyone.