[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45D1B5FA.5050704@trash.net>
Date: Tue, 13 Feb 2007 13:58:34 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
CC: netfilter-devel@...ts.netfilter.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.20 13/14] nfnetlink_log: fix reference counting
Micha³ Miros³aw wrote:
> Fix reference counting (memory leak) problem in __nfulnl_send() and callers
> related to packet queueing.
>
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
>
> --- linux-2.6.20/net/netfilter/nfnetlink_log.c.11 2007-02-12 17:35:50.000000000 +0100
> +++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-12 17:58:01.000000000 +0100
> @@ -223,6 +223,11 @@ _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);
> + instance_put(inst);
This should be done outside of the locked section and using
del_timer_sync to make sure the timer is not already active
and waiting for the lock.
Please combine this with 07/10 if possible.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists