]> err.no Git - linux-2.6/commitdiff
[NETFILTER]: nf_conntrack: add missing unlock in get_next_corpse()
authorMartin Josefsson <gandalf@wlug.westbo.se>
Mon, 30 Oct 2006 23:13:58 +0000 (15:13 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 30 Oct 2006 23:24:46 +0000 (15:24 -0800)
Add missing unlock in get_next_corpse() in nf_conntrack. It was missed
during the removal of listhelp.h . Also remove an unneeded use of
nf_ct_tuplehash_to_ctrack() in the same function.

Should be applied before 2.6.19 is released.

Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_core.c

index 093b3ddc513c96d8234910370f3c28a8feb2b593..836541e509fe14e67e04c10012b94ae594c0446b 100644 (file)
@@ -1520,9 +1520,10 @@ get_next_corpse(int (*iter)(struct nf_conn *i, void *data),
                if (iter(ct, data))
                        goto found;
        }
+       write_unlock_bh(&nf_conntrack_lock);
        return NULL;
 found:
-       atomic_inc(&nf_ct_tuplehash_to_ctrack(h)->ct_general.use);
+       atomic_inc(&ct->ct_general.use);
        write_unlock_bh(&nf_conntrack_lock);
        return ct;
 }