Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53c520c2 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: cttimeout: fix deadlock due to erroneous unlock/lock conversion



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

Fixes: b16c2919 ("netfilter: nf_conntrack: use safer way to lock all buckets")
Reported-by: default avatarkernel test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 7c7bdf35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
}