The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: fix a resource leak in copy_net_ns() error handling path
Date: Tue, 25 Aug 2026 10:40:09 +0000	[thread overview]
Message-ID: <178765440989.3381513.18011374580267192341.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <c182cf90-1ed7-435b-88f7-9f00e88a0487@I-love.SAKURA.ne.jp>

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sat, 22 Aug 2026 17:18:31 +0900 you wrote:
> Currently, preinit_net() does two things:
> 
>   (1) call ns_common_init() which might fail
>   (2) initialize resources which does not fail
> 
> However, preinit_net() is returning early when (1) fails, and copy_net_ns()
> is jumping to the dec_ucounts: label. As a result, resources allocated by
> net_alloc() are leaking. We need to call key_remove_domain() and
> net_passive_dec() in order to release resources allocated by net_alloc().
> 
> [...]

Here is the summary with links:
  - [net] net: fix a resource leak in copy_net_ns() error handling path
    https://git.kernel.org/netdev/net/c/3220b62fbb8a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      reply	other threads:[~2026-08-25 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22  8:18 [PATCH net] net: fix a resource leak in copy_net_ns() error handling path Tetsuo Handa
2026-08-25 10:40 ` patchwork-bot+netdevbpf [this message]

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=178765440989.3381513.18011374580267192341.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --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=penguin-kernel@I-love.SAKURA.ne.jp \
    /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