Skip to content

Commit

Permalink
[NETFILTER]: nf_conntrack: add missing unlock in get_next_corpse()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Josefsson authored and David S. Miller committed Oct 30, 2006
1 parent ef4512e commit c073e3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c073e3f

Please sign in to comment.