]> git.baikalelectronics.ru Git - kernel.git/commit
net: hold rtnl again in dump callbacks
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 25 May 2011 07:34:04 +0000 (07:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 May 2011 21:55:32 +0000 (17:55 -0400)
commit0e88fe245c5a53e8b3180dbad91970699157f145
treeb5046b08b0b4b13c45a2fffef4ad3218c9db07d8
parent7c8e41512a6b0ab38a60de2476558db5805b1f4f
net: hold rtnl again in dump callbacks

Commit 7e77fcbae33b (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>
net/core/fib_rules.c
net/core/rtnetlink.c