public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <bastien.curutchet@bootlin.com>
Cc: <alexis.lothore@bootlin.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <horms@kernel.org>, <kuba@kernel.org>,
	<kuniyu@amazon.com>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<razor@blackwall.org>, <stable@vger.kernel.org>,
	<thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH net 2/2] rtnetlink: Release nets when leaving rtnl_setlink()
Date: Wed, 12 Feb 2025 17:31:17 +0900	[thread overview]
Message-ID: <20250212083117.32671-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20250212-rtnetlink_leak-v1-2-27bce9a3ac9a@bootlin.com>

From: "Bastien Curutchet (eBPF Foundation)" <bastien.curutchet@bootlin.com>
Date: Wed, 12 Feb 2025 09:23:48 +0100
> rtnl_setlink() uses the rtnl_nets_* helpers but never calls the
> rtnl_nets_destroy(). It leads to small memory leaks.
> 
> Call rtnl_nets_destroy() before exiting to properly decrement the nets'
> reference counters.
> 
> Fixes: 636af13f213b ("rtnetlink: Register rtnl_dellink() and rtnl_setlink() with RTNL_FLAG_DOIT_PERNET_WIP.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>

It's fixed in 1438f5d07b9a ("rtnetlink: fix netns leak with
rtnl_setlink()").

Thanks!

  reply	other threads:[~2025-02-12  8:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  8:23 [PATCH net 0/2] rtnetlink: Fix small memory leaks Bastien Curutchet (eBPF Foundation)
2025-02-12  8:23 ` [PATCH net 1/2] rtnetlink: Fix rtnl_net_cmp_locks() when DEBUG is off Bastien Curutchet (eBPF Foundation)
2025-02-12  8:45   ` Kuniyuki Iwashima
2025-02-12  9:07     ` Bastien Curutchet
2025-02-12  8:23 ` [PATCH net 2/2] rtnetlink: Release nets when leaving rtnl_setlink() Bastien Curutchet (eBPF Foundation)
2025-02-12  8:31   ` Kuniyuki Iwashima [this message]
2025-02-12  9:05     ` Bastien Curutchet

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=20250212083117.32671-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=alexis.lothore@bootlin.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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