]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/netfilter/nf_conntrack_reasm.c
netfilter: nf_conntrack_ipv6: fix inconsistent lock state in nf_ct_frag6_gather()
[linux-2.6-omap-h63xx.git] / net / ipv6 / netfilter / nf_conntrack_reasm.c
index 2dccad48058c4e000ba37efca6d6ba389520c6ac..e65e26e210ee3a66873f6d472fdca708559fb0a2 100644 (file)
@@ -209,7 +209,9 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst)
        arg.dst = dst;
        hash = ip6qhashfn(id, src, dst);
 
+       local_bh_disable();
        q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash);
+       local_bh_enable();
        if (q == NULL)
                goto oom;
 
@@ -638,10 +640,10 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
                goto ret_orig;
        }
 
-       spin_lock(&fq->q.lock);
+       spin_lock_bh(&fq->q.lock);
 
        if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) {
-               spin_unlock(&fq->q.lock);
+               spin_unlock_bh(&fq->q.lock);
                pr_debug("Can't insert skb to queue\n");
                fq_put(fq);
                goto ret_orig;
@@ -653,7 +655,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
                if (ret_skb == NULL)
                        pr_debug("Can't reassemble fragmented packets\n");
        }
-       spin_unlock(&fq->q.lock);
+       spin_unlock_bh(&fq->q.lock);
 
        fq_put(fq);
        return ret_skb;