From: Jakub Kicinski <kuba@kernel.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Maoyi Xie <maoyixie.tju@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jan Vaclav <jvaclav@redhat.com>, Andrew Lunn <andrew@lunn.ch>,
Taehee Yoo <ap420073@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net] hsr: broadcast netlink notifications in the device's net namespace
Date: Wed, 27 May 2026 16:18:49 -0700 [thread overview]
Message-ID: <20260527161849.738b7f1f@kernel.org> (raw)
In-Reply-To: <21df0b14-f530-4e9a-931a-21154ec18c78@suse.de>
On Wed, 27 May 2026 13:11:57 +0200 Fernando Fernandez Mancera wrote:
> > genlmsg_end(skb, msg_head);
> > - genlmsg_multicast(&hsr_genl_family, skb, 0, 0, GFP_ATOMIC);
> > + genlmsg_multicast_netns(&hsr_genl_family, dev_net(master->dev),
> > + skb, 0, 0, GFP_ATOMIC);
> > + rcu_read_unlock();
> >
>
> The patch makes sense to me. Anyway, I think we can reduce the RCU
> critical section here.
>
> What about moving rcu_read_unlock() after the if and extract the net
> before unlocking? The benefit is minimal but I think it is worth it.
Not sure TBH, we'd need to take a ref on the netns and allocate
a tracker (on DEBUG kernels). One could go either way.
I'm replying because I wanted to question whether this is Fixes+stable@
worthy. Sending the notifications to the namespace where the device is
makes sense. But it's as much a behavior changes as it is a fix.
The commit in question was merged to 5.6, real users clearly don't care.
next prev parent reply other threads:[~2026-05-27 23:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 6:44 hsr: netlink notifications leak across network namespaces Maoyi Xie
2026-05-27 7:59 ` [PATCH net] hsr: broadcast netlink notifications in the device's net namespace Maoyi Xie
2026-05-27 11:11 ` Fernando Fernandez Mancera
2026-05-27 23:18 ` Jakub Kicinski [this message]
2026-05-31 10:23 ` Maoyi Xie
2026-05-31 20:01 ` Fernando Fernandez Mancera
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=20260527161849.738b7f1f@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=jvaclav@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maoyixie.tju@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@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.