All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kloetzke Jan <Jan.Kloetzke@preh.de>
To: "davem@davemloft.net" <davem@davemloft.net>,
	"oneukum@suse.com" <oneukum@suse.com>
Cc: "jan@kloetzke.net" <jan@kloetzke.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2] usbnet: fix kernel crash after disconnect
Date: Thu, 16 May 2019 07:10:30 +0000	[thread overview]
Message-ID: <1557990629.19453.7.camel@preh.de> (raw)
In-Reply-To: <1557130666.12778.3.camel@suse.com>

Am Montag, den 06.05.2019, 10:17 +0200 schrieb Oliver Neukum:
> On So, 2019-05-05 at 00:45 -0700, David Miller wrote:
> > From: Kloetzke Jan <Jan.Kloetzke@preh.de>
> > 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.

Dave, could you shed some light on Olivers question? If the race can
happen then we can stick to v1 because the WARN_ON is indeed pointless.
Otherwise it's not clear why it made the problem go away for us and v2
may be the better option...

Regards,
Jan

  reply	other threads:[~2019-05-16  7:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17  9:19 [PATCH] usbnet: fix kernel crash after disconnect Kloetzke Jan
2019-04-17  9:19 ` Kloetzke Jan
2019-04-18  6:37 ` [PATCH] " Oliver Neukum
2019-04-18  6:37   ` Oliver Neukum
2019-04-18  8:02   ` [PATCH] " Kloetzke Jan
2019-04-18  8:02     ` Kloetzke Jan
2019-04-18 23:35     ` [PATCH] " David Miller
2019-04-18 23:35       ` David Miller
2019-04-19  7:17       ` [PATCH] " Jan Klötzke
2019-04-19  7:17         ` Jan Klötzke
2019-04-29 18:48         ` [PATCH] " Oliver Neukum
2019-04-29 18:48           ` Oliver Neukum
2019-04-30 14:08           ` [PATCH] " Kloetzke Jan
2019-04-30 14:08             ` Kloetzke Jan
2019-04-30 14:15           ` [PATCH v2] " Kloetzke Jan
2019-04-30 14:15             ` [v2] " Kloetzke Jan
2019-05-05  7:45             ` [PATCH v2] " David Miller
2019-05-05  7:45               ` [v2] " David Miller
2019-05-06  8:17               ` [PATCH v2] " Oliver Neukum
2019-05-16  7:10                 ` Kloetzke Jan [this message]
2019-05-21  0:09                   ` David Miller
2019-05-21  9:48                   ` Oliver Neukum
2019-05-21 10:12                     ` Kloetzke Jan
2019-05-21 11:42                       ` Oliver Neukum
2019-05-21 13:18                         ` [PATCH v3] " Kloetzke Jan
2019-05-21 20:47                           ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1557990629.19453.7.camel@preh.de \
    --to=jan.kloetzke@preh.de \
    --cc=davem@davemloft.net \
    --cc=jan@kloetzke.net \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.