lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 30 Sep 2022 18:57:15 -0700 From: Eric Dumazet <edumazet@...gle.com> To: Kevin Mitchell <kevmitch@...sta.com> Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Antoine Tenart <atenart@...nel.org>, netdev <netdev@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] netdevice: don't warn when capping txqueue 0 On Fri, Sep 30, 2022 at 6:02 PM Kevin Mitchell <kevmitch@...sta.com> wrote: > > With commit d7dac083414e ("net-sysfs: update the queue counts in the > unregistration path"), we started seeing the following warning message > during our stress test that streams packets out of a device while > registering and unregistering it: > > et3_11_1 selects TX queue 0, but real number of TX queues is 0 > > The issue is that remove_queue_kobjects() is setting real_num_tx_queues > to 0 before the last few packets are queued. When netdev_cap_txqueue() > is called to cap queue = 0, it emits this message. > > However, when queue == real_num_tx_queues == 0, this message doesn't > make much sense because 0 is the fallback value returned > anyway. Therefore, omit the warning when queue is already the fallback > value of 0. If there is no TX queue, I do not think we should select queue #0 ? It seems we should fix the root cause, because transmit should be prohibited first, then device can 'unregister'. Something is definitely wrong with a driver, or a layer not properly observing IFF_UP rules and/or rcu grace periods in device dismantles. > > Fixes: d7dac083414e ("net-sysfs: update the queue counts in the unregistration path") > Link: https://lore.kernel.org/r/YzOjEqBMtF+Ib72v@chmeee/ > Signed-off-by: Kevin Mitchell <kevmitch@...sta.com> > --- > include/linux/netdevice.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 05d6f3facd5a..3fd1e50b6bf5 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -3493,7 +3493,7 @@ static inline void netdev_reset_queue(struct net_device *dev_queue) > */ > static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index) > { > - if (unlikely(queue_index >= dev->real_num_tx_queues)) { > + if (unlikely(queue_index > 0 && queue_index >= dev->real_num_tx_queues)) { > net_warn_ratelimited("%s selects TX queue %d, but real number of TX queues is %d\n", > dev->name, queue_index, > dev->real_num_tx_queues); > -- > 2.37.2 >
Powered by blists - more mailing lists