Re: [PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-23 Thread Andrea Righi
On Thu, Jul 23, 2020 at 02:57:22PM -0700, David Miller wrote: > From: Andrea Righi > Date: Wed, 22 Jul 2020 08:52:11 +0200 > > > +static int xennet_remove(struct xenbus_device *dev) > > +{ > > + struct netfront_info *info = dev_get_drvdata(&dev->dev); > > + > > + dev_dbg(&dev->dev, "%s\n", de

Re: [PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-23 Thread David Miller
From: Andrea Righi Date: Wed, 22 Jul 2020 08:52:11 +0200 > +static int xennet_remove(struct xenbus_device *dev) > +{ > + struct netfront_info *info = dev_get_drvdata(&dev->dev); > + > + dev_dbg(&dev->dev, "%s\n", dev->nodename); These kinds of debugging messages provide zero context and

[PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-21 Thread Andrea Righi
There's a potential race in xennet_remove(); this is what the driver is doing upon unregistering a network device: 1. state = read bus state 2. if state is not "Closed": 3.request to set state to "Closing" 4.wait for state to be set to "Closing" 5.request to set state to "Clo