Commit cb1cb5c4 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by David S. Miller
Browse files

netfilter: ctnetlink: fix sleep in read-side lock section



Fix allocation with GFP_KERNEL in ctnetlink_create_conntrack() under
read-side lock sections.

This problem was introduced in 2.6.25.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1575e7ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1139,7 +1139,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
	rcu_read_lock();
	helper = __nf_ct_helper_find(rtuple);
	if (helper) {
		help = nf_ct_helper_ext_add(ct, GFP_KERNEL);
		help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
		if (help == NULL) {
			rcu_read_unlock();
			err = -ENOMEM;