[PATCH 1/2] net: dsa: RCU-protect dsa_ptr in struct net_device

Sverdlin, Alexander alexander.sverdlin at siemens.com
Tue Sep 10 13:40:26 PDT 2024


Hi Florian!

On Tue, 2024-09-10 at 10:40 -0700, Florian Fainelli wrote:
> > RCU-protect dsa_ptr and use rcu_dereference() or rtnl_dereference()
> > depending on the calling context.
> > 
> > Rename netdev_uses_dsa() into __netdev_uses_dsa_currently()
> > (assumes ether RCU or RTNL lock held) and netdev_uses_dsa_currently()
> > variants which better reflect the uselessness of the function's
> > return value, which becomes outdated right after the call.
> > 
> > Fixes: ee534378f005 ("net: dsa: fix panic when DSA master device unbinds on shutdown")
> > Cc: stable at vger.kernel.org
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin at siemens.com>
> 
> Thanks for doing this work, just a few nits below. This is likely to be 
> difficult to backport to stable trees.

Thanks for the quick feedback!
As I've mentioned in the cover letter, I've v6.1 backport already available
and I'm ready to backport to v6.8 as soon as we agree on the final form for
v6.11.

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com


More information about the Linux-mediatek mailing list