|
@@ -1090,7 +1090,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
|
|
|
struct nf_conn_help *help;
|
|
|
struct nf_conntrack_helper *helper;
|
|
|
|
|
|
- ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_KERNEL);
|
|
|
+ ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC);
|
|
|
if (ct == NULL || IS_ERR(ct))
|
|
|
return -ENOMEM;
|
|
|
|
|
@@ -1212,13 +1212,14 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
|
|
|
atomic_inc(&master_ct->ct_general.use);
|
|
|
}
|
|
|
|
|
|
- spin_unlock_bh(&nf_conntrack_lock);
|
|
|
err = -ENOENT;
|
|
|
if (nlh->nlmsg_flags & NLM_F_CREATE)
|
|
|
err = ctnetlink_create_conntrack(cda,
|
|
|
&otuple,
|
|
|
&rtuple,
|
|
|
master_ct);
|
|
|
+ spin_unlock_bh(&nf_conntrack_lock);
|
|
|
+
|
|
|
if (err < 0 && master_ct)
|
|
|
nf_ct_put(master_ct);
|
|
|
|