Skip to content

Commit

Permalink
netfilter: cttimeout: fix deadlock due to erroneous unlock/lock conve…
Browse files Browse the repository at this point in the history
…rsion

The spin_unlock call should have been left as-is, revert.

Fixes: b16c291 ("netfilter: nf_conntrack: use safer way to lock all buckets")
Reported-by: kernel test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed Jan 31, 2016
1 parent 7c7bdf3 commit 53c520c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nfnetlink_cttimeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static void ctnl_untimeout(struct net *net, struct ctnl_timeout *timeout)
hlist_nulls_for_each_entry(h, nn, &net->ct.hash[i], hnnode)
untimeout(h, timeout);
}
nf_conntrack_lock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
spin_unlock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
}
local_bh_enable();
}
Expand Down

0 comments on commit 53c520c

Please sign in to comment.