]> err.no Git - linux-2.6/commitdiff
netfilter: ctnetlink: fix sleep in read-side lock section
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 19 Aug 2008 04:31:24 +0000 (21:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Aug 2008 04:31:24 +0000 (21:31 -0700)
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: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_netlink.c

index d1fb2f8555e85003e2b1b2386feb0d7787de7c1c..a5b95ccb3ce7a2835cf90d215314c2f1d610d6fb 100644 (file)
@@ -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;