summaryrefslogtreecommitdiffstats
path: root/net/core/fib_rules.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-05-25 07:34:04 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-25 17:55:32 -0400
commit2907c35ff64708065e5a7fd54e8ded8263eb3074 (patch)
treeb5046b08b0b4b13c45a2fffef4ad3218c9db07d8 /net/core/fib_rules.c
parent1dcb14d9e874d12bab9ceeba776b742f1682b0a6 (diff)
downloadop-kernel-dev-2907c35ff64708065e5a7fd54e8ded8263eb3074.zip
op-kernel-dev-2907c35ff64708065e5a7fd54e8ded8263eb3074.tar.gz
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 <eric.dumazet@gmail.com> CC: Patrick McHardy <kaber@trash.net> CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/fib_rules.c')
-rw-r--r--net/core/fib_rules.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 3911586..008dc70 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);
OpenPOWER on IntegriCloud