All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add missing unlock in get_next_corpse()
@ 2006-10-29 12:27 Martin Josefsson
  2006-10-30 15:31 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Josefsson @ 2006-10-29 12:27 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

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>

---
 net/netfilter/nf_conntrack_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.19-rc3-git4.quilt/net/netfilter/nf_conntrack_core.c
===================================================================
--- linux-2.6.19-rc3-git4.quilt.orig/net/netfilter/nf_conntrack_core.c	2006-10-29 11:47:09.000000000 +0100
+++ linux-2.6.19-rc3-git4.quilt/net/netfilter/nf_conntrack_core.c	2006-10-29 11:47:41.000000000 +0100
@@ -1520,9 +1520,10 @@ get_next_corpse(int (*iter)(struct nf_co
 		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;
 }

-- 
/Martin

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add missing unlock in get_next_corpse()
  2006-10-29 12:27 [PATCH] Add missing unlock in get_next_corpse() Martin Josefsson
@ 2006-10-30 15:31 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-10-30 15:31 UTC (permalink / raw)
  To: Martin Josefsson; +Cc: netfilter-devel

Martin Josefsson wrote:
> 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.

Applied, thanks for catching this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-30 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-29 12:27 [PATCH] Add missing unlock in get_next_corpse() Martin Josefsson
2006-10-30 15:31 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.