All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, david-b@pacbell.net
Subject: Re: netif_tx_disable vs netif_stop_queue (possible races?)
Date: Fri, 09 Jun 2006 16:29:13 +0100	[thread overview]
Message-ID: <448993C9.8040400@gentoo.org> (raw)
In-Reply-To: <E1FoYoi-0001gg-00@gondolin.me.apana.org.au>

Herbert Xu wrote:
> Daniel Drake <dsd@gentoo.org> wrote:
>> More specifically, we're talking about drivers/usb/net/usbnet.c and the 
>> usbnet_disconnect() function.  The race I am highlighting is that 
>> usbnet's hard_start_xmit handler (usbnet_start_xmit) may be running when 
>> the disconnect happens.
>>
>> Is this a possible scenario?
> 
> It should be safe, if only because of the synchronize_net that occurs
> before a netdev can be freed.

Can I interpret your response as: If the TX queue is disabled in 
advance, no hard_start_xmit functions will be running on any CPU after 
synchronize_net() has returned?

The synchronize_net() code doesn't make it very clear.

Thanks,
Daniel

  reply	other threads:[~2006-06-09 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-08 23:14 netif_tx_disable vs netif_stop_queue (possible races?) Daniel Drake
2006-06-09  4:41 ` Herbert Xu
2006-06-09 15:29   ` Daniel Drake [this message]
2006-06-09 23:35     ` Herbert Xu
2006-06-10 12:42       ` Daniel Drake
2006-06-10 12:59         ` Evgeniy Polyakov
2006-06-10 16:40           ` Daniel Drake
2006-06-10 17:15             ` Evgeniy Polyakov

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=448993C9.8040400@gentoo.org \
    --to=dsd@gentoo.org \
    --cc=david-b@pacbell.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    /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.