Re: [PATCH net] hsr: broadcast netlink notifications in the device's net namespace

From: Fernando Fernandez Mancera

Date: Sun May 31 2026 - 16:01:52 EST




On 5/31/26 12:23 PM, Maoyi Xie wrote:
On Thu, 28 May 2026 07:18, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
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.

On the RCU side, you're right that moving the net out of the lock
means taking a ref, and this isn't a hot path where that really pays
off. So I'd lean towards keeping it as posted, with the multicast
still inside the rcu_read_lock. Fernando, thanks for the suggestion
either way.


In such case:

Reviewed-by: Fernando Fernandez Mancera <fmancera@xxxxxxx>

Keep it if re-posted to net-next please.

Thanks!

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.

On the Fixes and stable tags, my thinking was that the init_net side
is an information leak. A privileged listener there ends up seeing
ring error and node down events from devices in other netns. The
payload carries the peer MAC and the slave ifindex. That was my reason
for tagging it.

But I see your point that it is as much a behavior change as a fix,
and if nobody has hit it since 5.6, the risk is clearly low. I don't
feel strongly here. If you'd rather take it as a plain net-next
improvement without the two tags, that is completely fine by me and I
will respin it that way.

Thanks,
Maoyi