Subject: Re: [PATCH v2] usbnet: fix kernel crash after disconnect

From: Oliver Neukum <[email-masked]>
Date: Mon, 06 May 2019 10:17:46 +0200

On So, 2019-05-05 at 00:45 -0700, David Miller wrote:
> From: Kloetzke Jan <[email-masked]>
> Date: Tue, 30 Apr 2019 14:15:07 +0000
> 
> > @@ -1431,6 +1432,11 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
> >               spin_unlock_irqrestore(&dev->txq.lock, flags);
> >               goto drop;
> >       }
> > +     if (WARN_ON(netif_queue_stopped(net))) {
> > +             usb_autopm_put_interface_async(dev->intf);
> > +             spin_unlock_irqrestore(&dev->txq.lock, flags);
> > +             goto drop;
> > +     }
> 
> If this is known to happen and is expected, then we should not warn.
> 

Hi,

yes this is the point. Can ndo_start_xmit() and ndo_stop() race?
If not, why does the patch fix the observed issue and what
prevents the race? Something is not clear here.

	Regards
		Oliver