Commit 9d47b380563174e5c15776ce6ca9bab4ee7d59e3

Authored by Johannes Berg
Committed by David S. Miller
1 parent e75dc677ff

Revert "genetlink: fix family dump race"

This reverts commit 58ad436fcf49810aa006016107f494c9ac9013db.

It turns out that the change introduced a potential deadlock
by causing a locking dependency with netlink's cb_mutex. I
can't seem to find a way to resolve this without doing major
changes to the locking, so revert this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 0 additions and 7 deletions Side-by-side Diff

net/netlink/genetlink.c
... ... @@ -789,11 +789,7 @@
789 789 struct net *net = sock_net(skb->sk);
790 790 int chains_to_skip = cb->args[0];
791 791 int fams_to_skip = cb->args[1];
792   - bool need_locking = chains_to_skip || fams_to_skip;
793 792  
794   - if (need_locking)
795   - genl_lock();
796   -
797 793 for (i = chains_to_skip; i < GENL_FAM_TAB_SIZE; i++) {
798 794 n = 0;
799 795 list_for_each_entry(rt, genl_family_chain(i), family_list) {
... ... @@ -813,9 +809,6 @@
813 809 errout:
814 810 cb->args[0] = i;
815 811 cb->args[1] = n;
816   -
817   - if (need_locking)
818   - genl_unlock();
819 812  
820 813 return skb->len;
821 814 }