From 2907c35ff64708065e5a7fd54e8ded8263eb3074 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Wed, 25 May 2011 07:34:04 +0000 Subject: net: hold rtnl again in dump callbacks Commit e67f88dd12f6 (dont hold rtnl mutex during netlink dump callbacks) missed fact that rtnl_fill_ifinfo() must be called with rtnl held. Because of possible deadlocks between two mutexes (cb_mutex and rtnl), its not easy to solve this problem, so revert this part of the patch. It also forgot one rcu_read_unlock() in FIB dump_rules() Add one ASSERT_RTNL() in rtnl_fill_ifinfo() to remind us the rule. Signed-off-by: Eric Dumazet CC: Patrick McHardy CC: Stephen Hemminger Signed-off-by: David S. Miller --- net/core/fib_rules.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/core/fib_rules.c') diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 3911586e12e4..008dc70b064b 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -602,6 +602,7 @@ static int dump_rules(struct sk_buff *skb, struct netlink_callback *cb, skip: idx++; } + rcu_read_unlock(); cb->args[1] = idx; rules_ops_put(ops); -- cgit v1.2.3