From: David Miller <davem@davemloft.net>
To: jakub.kicinski@netronome.com
Cc: john.fastabend@gmail.com, alexander.duyck@gmail.com,
tom@herbertland.com, netdev@vger.kernel.org,
oss-drivers@netronome.com
Subject: Re: [PATCH net] net: fix race on decreasing number of TX queues
Date: Wed, 14 Feb 2018 14:16:13 -0500 (EST) [thread overview]
Message-ID: <20180214.141613.66054944399992487.davem@davemloft.net> (raw)
In-Reply-To: <20180213053531.13080-1-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Mon, 12 Feb 2018 21:35:31 -0800
> netif_set_real_num_tx_queues() can be called when netdev is up.
> That usually happens when user requests change of number of
> channels/rings with ethtool -L. The procedure for changing
> the number of queues involves resetting the qdiscs and setting
> dev->num_tx_queues to the new value. When the new value is
> lower than the old one, extra care has to be taken to ensure
> ordering of accesses to the number of queues vs qdisc reset.
>
> Currently the queues are reset before new dev->num_tx_queues
> is assigned, leaving a window of time where packets can be
> enqueued onto the queues going down, leading to a likely
> crash in the drivers, since most drivers don't check if TX
> skbs are assigned to an active queue.
>
> Fixes: e6484930d7c7 ("net: allocate tx queues in register_netdevice")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
> Also reported: http://lists.openwall.net/netdev/2017/04/26/211,
> GSO just made it more likely.
Looks good, applied and queued up for -stable, thanks!
prev parent reply other threads:[~2018-02-14 19:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 5:35 [PATCH net] net: fix race on decreasing number of TX queues Jakub Kicinski
2018-02-14 19:16 ` David Miller [this message]
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=20180214.141613.66054944399992487.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.duyck@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=tom@herbertland.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).