From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [XFRM]: Fix leak of expired xfrm_states
Date: Mon, 26 Nov 2007 16:51:42 +0100 [thread overview]
Message-ID: <474AEB8E.9040903@trash.net> (raw)
In-Reply-To: <20071126154625.GI28022@gondor.apana.org.au>
Herbert Xu wrote:
> On Mon, Nov 26, 2007 at 04:05:27PM +0100, Patrick McHardy wrote:
>> This patch fixes a xfrm_state leak, which appears to be a
>> regression from the reference count simplifications.
>
> I was going to say this was a good find :)
>
> But digging deeper it seems that it might not be a bug after
> all. Even though the ref count on x may now drop to zero, it
> won't be freed until del_timer_sync returns which should be
> sufficient, no?
It actually won't get freed at all currently since nothing is
calling __xfrm_state_destroy(). __xfrm_state_delete() uses
__xfrm_state_put(), which only decrements the refcount, but
doesn't perform destruction.
This is visible when looking at the xfrm[46]_mode_{tunnel,transport}
module reference counts, they climb higher and higher over time.
next prev parent reply other threads:[~2007-11-26 15:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 15:05 [XFRM]: Fix leak of expired xfrm_states Patrick McHardy
2007-11-26 15:46 ` Herbert Xu
2007-11-26 15:51 ` Patrick McHardy [this message]
2007-11-26 15:54 ` Herbert Xu
2007-11-26 15:56 ` Patrick McHardy
2007-11-26 16:22 ` Herbert Xu
2007-11-26 16:52 ` Patrick McHardy
2007-11-27 3:11 ` Herbert Xu
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=474AEB8E.9040903@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/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 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.