[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250523124824.GA4946@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date: Fri, 23 May 2025 05:48:24 -0700
From: Saurabh Singh Sengar <ssengar@...ux.microsoft.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, horms@...nel.org,
ast@...nel.org, daniel@...earbox.net, hawk@...nel.org,
john.fastabend@...il.com, sdf@...ichev.me, kuniyu@...zon.com,
ahmed.zaki@...el.com, aleksander.lobakin@...el.com,
linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
ssengar@...rosoft.com, stable@...r.kernel.org
Subject: Re: [PATCH net,v2] hv_netvsc: fix potential deadlock in
netvsc_vf_setxdp()
On Thu, May 22, 2025 at 03:13:46PM -0700, Jakub Kicinski wrote:
> On Wed, 21 May 2025 03:25:03 -0700 Saurabh Sengar wrote:
> > The MANA driver's probe registers netdevice via the following call chain:
> >
> > mana_probe()
> > register_netdev()
> > register_netdevice()
> >
> > register_netdevice() calls notifier callback for netvsc driver,
> > holding the netdev mutex via netdev_lock_ops().
> >
> > Further this netvsc notifier callback end up attempting to acquire the
> > same lock again in dev_xdp_propagate() leading to deadlock.
> >
> > netvsc_netdev_event()
> > netvsc_vf_setxdp()
> > dev_xdp_propagate()
> >
> > This deadlock was not observed so far because net_shaper_ops was never set,
>
> The lock is on the VF, I think you meant to say that no device you use
> in Azure is ops locked?
That's right.
>
> There's also the call to netvsc_register_vf() on probe path, please
> fix or explain why it doesn't need locking in the commit message.
On rethinking I realize you were referring to the netvsc_probe() path not
mana_probe(). Since this lock is effectively a no-op, it doesn't really
matter whether it's there or not.
However, I think we can revisit this when we add ops for any of the VFs.
- Saurabh
Powered by blists - more mailing lists