netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Lu Wei <luwei32@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, wsa+renesas@sang-engineering.com,
	tglx@linutronix.de, peterz@infradead.org, maheshb@google.com,
	fw@strlen.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] ipvlan: Fix a reference count leak warning in ipvlan_ns_exit()
Date: Thu, 17 Aug 2023 17:13:37 +0200	[thread overview]
Message-ID: <20230817151337.GH4312@breakpoint.cc> (raw)
In-Reply-To: <20230817145449.141827-1-luwei32@huawei.com>

Lu Wei <luwei32@huawei.com> wrote:
> There are two network devices(veth1 and veth3) in ns1, and ipvlan1 with
> L3S mode and ipvlan2 with L2 mode are created based on them as
> figure (1). In this case, ipvlan_register_nf_hook() will be called to
> register nf hook which is needed by ipvlans in L3S mode in ns1 and value
> of ipvl_nf_hook_refcnt is set to 1.

[..]

> register nf_hook in ns2 and unregister nf_hook in ns1. As a result,
> ipvl_nf_hook_refcnt in ns1 is decreased incorrectly and this in ns2
> is increased incorrectly. When the second net namespace is removed, a
> reference count leak warning in ipvlan_ns_exit() will be triggered.
> 
> This patch add a check before ipvlan_migrate_l3s_hook() is called.

Reviewed-by: Florian Westphal <fw@strlen.de>

  reply	other threads:[~2023-08-17 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 14:54 [PATCH net] ipvlan: Fix a reference count leak warning in ipvlan_ns_exit() Lu Wei
2023-08-17 15:13 ` Florian Westphal [this message]
2023-08-19  2:50 ` patchwork-bot+netdevbpf

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=20230817151337.GH4312@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luwei32@huawei.com \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).