linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Greg KH <greg@kroah.com>
Cc: Greg KH <gregkh@suse.de>,
	linux-kernel@vger.kernel.org, stable@kernel.org,
	"Theodore Ts'o" <tytso@mit.edu>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	netfilter-devel@lists.netfilter.org,
	Justin Forbes <jmforbes@linuxtx.org>,
	Chris Wedgwood <reviews@ml.cw.f00f.org>,
	davem@davemloft.net, Randy Dunlap <rdunlap@xenotime.net>,
	Michael Krufky <mkrufky@linuxtv.org>,
	Chuck Ebbert <cebbert@redhat.com>, Dave Jones <davej@redhat.com>,
	Chuck Wolber <chuckw@quantumlinux.com>,
	akpm@linux-foundation.org,
	Michal Miroslaw <mirq-linux@rere.qmqm.pl>,
	torvalds@linux-foundation.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [stable] [patch 12/20] nfnetlink_log: fix reference counting
Date: Tue, 13 Mar 2007 16:45:26 +0100	[thread overview]
Message-ID: <45F6C716.4070104@trash.net> (raw)
In-Reply-To: <20070310091445.GA26611@kroah.com>

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

Greg KH wrote:
>>[NETFILTER]: nfnetlink_log: fix reference counting
>>
> As this patch does nothing, it's now dropped.  It was my fault as the
> original patch didn't apply and I messed up using quilt here.

Sorry, I must have messed up something. I've fixed up the original
patch, this one should apply on top of the stable queue with the
broken patch removed.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1535 bytes --]

[NETFILTER]: nfnetlink_log: fix reference counting

Fix reference counting (memory leak) problem in __nfulnl_send() and callers
related to packet queueing.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 3ed110cfb9e71fa5f6c44720f20a8e705e9bad0c
tree 607c19476244b034aaf8c0da12f04349cd48bf90
parent 43ff9c5b97da4d085ddf5e37a12a25ed74c14d5a
author Michal Miroslaw <mirq-linux@rere.qmqm.pl> Tue, 13 Mar 2007 16:41:58 +0100
committer Patrick McHardy <kaber@trash.net> Tue, 13 Mar 2007 16:41:58 +0100

 net/netfilter/nfnetlink_log.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 690b173..f7eafd8 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -218,10 +218,8 @@ _instance_destroy2(struct nfulnl_instanc
 	spin_lock_bh(&inst->lock);
 	if (inst->skb) {
 		/* timer "holds" one reference (we have one more) */
-		if (timer_pending(&inst->timer)) {
-			del_timer(&inst->timer);
+		if (del_timer(&inst->timer))
 			instance_put(inst);
-		}
 		if (inst->qlen)
 			__nfulnl_send(inst);
 		if (inst->skb) {
@@ -695,10 +693,8 @@ #endif
 		UDEBUG("flushing old skb\n");
 
 		/* timer "holds" one reference (we have another one) */
-		if (timer_pending(&inst->timer)) {
-			del_timer(&inst->timer);
+		if (del_timer(&inst->timer))
 			instance_put(inst);
-		}
 		__nfulnl_send(inst);
 
 		if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {

  reply	other threads:[~2007-03-13 15:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070310061234.465093436@mini.kroah.org>
2007-03-10  6:16 ` [patch 00/20] 2.6.20-stable review Greg KH
2007-03-10  6:16   ` [patch 01/20] conntrack: fix {nf, ip}_ct_iterate_cleanup endless loops Greg KH
2007-03-10  6:16   ` [patch 02/20] nf_conntrack/nf_nat: fix incorrect config ifdefs Greg KH
2007-03-10  6:16   ` [patch 03/20] tcp conntrack: accept SYN|URG as valid Greg KH
2007-03-10  6:17   ` [patch 04/20] nfnetlink_log: fix reference leak Greg KH
2007-03-10  6:17   ` [patch 05/20] nfnetlink_log: fix use after free Greg KH
2007-03-10  6:17   ` [patch 06/20] nfnetlink_log: fix NULL pointer dereference Greg KH
2007-03-10  6:17   ` [patch 07/20] nfnetlink_log: fix possible " Greg KH
2007-03-10  6:17   ` [patch 08/20] ip6_route_me_harder should take into account mark Greg KH
2007-03-10  6:17   ` [patch 09/20] nf_conntrack: fix incorrect classification of IPv6 fragments as ESTABLISHED Greg KH
2007-03-10  6:17   ` [patch 10/20] nfnetlink_log: zero-terminate prefix Greg KH
2007-03-10  6:17   ` [patch 11/20] nfnetlink_log: fix crash on bridged packet Greg KH
2007-03-10  6:18   ` [patch 12/20] nfnetlink_log: fix reference counting Greg KH
2007-03-10  9:14     ` [stable] " Greg KH
2007-03-13 15:45       ` Patrick McHardy [this message]
2007-03-10  6:18   ` [patch 13/20] Fix bug 7994 sleeping function called from invalid context Greg KH
2007-03-10  6:18   ` [patch 14/20] bcm43xx: Fix problem with >1 GB RAM Greg KH
2007-03-10  6:18   ` [patch 15/20] Fix compat_getsockopt Greg KH
2007-03-10  6:18   ` [patch 16/20] fix for bugzilla #7544 (keyspan USB-to-serial converter) Greg KH
2007-03-10  6:18   ` [patch 17/20] Fix callback bug in connector Greg KH
2007-03-10  6:18   ` [patch 18/20] Fix sparc64 device register probing Greg KH
2007-03-10  6:18   ` [patch 19/20] Fix timewait jiffies Greg KH
2007-03-10  6:19   ` [patch 20/20] Fix UDP header pointer after pskb_trim_rcsum() Greg KH
2007-03-10  6:23   ` [patch 00/20] 2.6.20-stable review Greg KH
2007-03-10 21:43     ` Chuck Ebbert
2007-03-10 21:49       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45F6C716.4070104@trash.net \
    --to=kaber@trash.net \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cebbert@redhat.com \
    --cc=chuckw@quantumlinux.com \
    --cc=davej@redhat.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=jmforbes@linuxtx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=mkrufky@linuxtv.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rdunlap@xenotime.net \
    --cc=reviews@ml.cw.f00f.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).