public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuan Tan <yuantan098@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, Ren Wei <n05ec@lzu.edu.cn>
Cc: yuantan098@gmail.com, netdev@vger.kernel.org,
	idosch@mellanox.com, dsahern@kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, jiri@resnulli.us, yifanwucs@gmail.com,
	tomapufckgml@gmail.com, bird@lzu.edu.cn, royenheart@gmail.com
Subject: Re: [PATCH net v3 1/1] net: l3mdev: Reject non-L3 uppers in slave helpers
Date: Tue, 21 Apr 2026 12:44:24 -0700	[thread overview]
Message-ID: <676ac55c-1549-40a7-9a0c-c69e472417e1@gmail.com> (raw)
In-Reply-To: <20260421091039.GA1085009@shredder>


On 4/21/2026 2:10 AM, Ido Schimmel wrote:
> On Mon, Apr 20, 2026 at 09:26:50PM +0300, Ido Schimmel wrote:
>> On Mon, Apr 20, 2026 at 02:32:08PM +0300, Ido Schimmel wrote:
>>> On Sun, Apr 19, 2026 at 10:53:32PM +0800, Ren Wei wrote:
>>>> From: Haoze Xie <royenheart@gmail.com>
>>>>
>>>> Several l3mdev slave-side helpers resolve an upper device and then use
>>>> l3mdev_ops without first proving that the resolved device is still a
>>>> valid L3 master.
>>>>
>>>> During slave transition, an RCU reader can transiently observe an upper
>>>> that is not an L3 master. Guard the affected slave-resolved paths by
>>>> requiring the resolved upper to still be an L3 master before using
>>>> l3mdev_ops, while keeping existing L3 RX handler providers intact.
>>>>
>>>> Fixes: fdeea7be88b1 ("net: vrf: Set slave's private flag before linking")
>>>> Cc: stable@kernel.org
>>>> Reported-by: Yifan Wu <yifanwucs@gmail.com>
>>>> Reported-by: Juefei Pu <tomapufckgml@gmail.com>
>>>> Co-developed-by: Yuan Tan <yuantan098@gmail.com>
>>>> Signed-off-by: Yuan Tan <yuantan098@gmail.com>
>>>> Suggested-by: Xin Liu <bird@lzu.edu.cn>
>>>> Tested-by: Haoze Xie <royenheart@gmail.com>
>>>> Signed-off-by: Haoze Xie <royenheart@gmail.com>
>>>> Signed-off-by: Ao Zhou <n05ec@lzu.edu.cn>
>>> I think it's fine for net:
>>>
>>> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>> Thought about this again. I would like to check another approach
>> (synchronize_net() after clearing IFF_L3MDEV_SLAVE). Will update
>> tomorrow.
> Sorry about the back and forth, but I thought about it again last night
> and I think that this is a better fix:
>
> https://github.com/idosch/linux/commit/e67517758ebcddf8a1b97817e4ab0fbf82f467fe.patch
>
> It's a minimal fix in the control plane of the VRF driver which doesn't
> add more checks in the data path. I can submit it later this week unless
> there are objections.

Thank for you time and review!

Btw could you add a Reported-by: Yuan Tan <yuantan098@gmail.com>? Thanks.


      reply	other threads:[~2026-04-21 19:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 14:53 [PATCH net v3 1/1] net: l3mdev: Reject non-L3 uppers in slave helpers Ren Wei
2026-04-20 11:32 ` Ido Schimmel
2026-04-20 18:26   ` Ido Schimmel
2026-04-21  9:10     ` Ido Schimmel
2026-04-21 19:44       ` Yuan Tan [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=676ac55c-1549-40a7-9a0c-c69e472417e1@gmail.com \
    --to=yuantan098@gmail.com \
    --cc=bird@lzu.edu.cn \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@mellanox.com \
    --cc=idosch@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=n05ec@lzu.edu.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=royenheart@gmail.com \
    --cc=tomapufckgml@gmail.com \
    --cc=yifanwucs@gmail.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