[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 11 Nov 2021 12:50:44 -0800
From: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
To: Alexander Lobakin <alexandr.lobakin@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Michal Swiatkowski <michal.swiatkowski@...el.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Antoine Tenart <atenart@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Wei Wang <weiwan@...gle.com>,
Björn Töpel <bjorn@...nel.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net] net: fix premature exit from NAPI state polling
in napi_disable()
Alexander Lobakin [alexandr.lobakin@...el.com] wrote:
> Commit 719c57197010 ("net: make napi_disable() symmetric with
> enable") accidentally introduced a bug sometimes leading to a kernel
> BUG when bringing an iface up/down under heavy traffic load.
>
> Prior to this commit, napi_disable() was polling n->state until
> none of (NAPIF_STATE_SCHED | NAPIF_STATE_NPSVC) is set and then
> always flip them. Now there's a possibility to get away with the
> NAPIF_STATE_SCHE unset as 'continue' drops us to the cmpxchg()
> call with an unitialized variable, rather than straight to
> another round of the state check.
Thanks. Tested v1 and it fixes the problem discussed at:
https://lore.kernel.org/netdev/dc6902364a8f91c4292fe1c5e01b24be@imap.linux.ibm.com/
Sukadev
Powered by blists - more mailing lists