[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLik6p2NFVZpC82YaZceRPMwtx2hdYA664ytWg1JL3NycWg@mail.gmail.com>
Date: Wed, 22 Jan 2025 23:23:56 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
dan.carpenter@...aro.org, pavan.chebbi@...adcom.com, mchan@...adcom.com,
kuniyu@...zon.com, romieu@...zoreil.com
Subject: Re: [PATCH net v2 1/7] eth: tg3: fix calling napi_enable() in atomic context
On Wed, Jan 22, 2025 at 4:45 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> tg3 has a spin lock protecting most of the config,
> switch to taking netdev_lock() explicitly on enable/start
> paths. Disable/stop paths seem to not be under the spin
> lock (since napi_disable() already needs to sleep),
> so leave that side as is.
>
> tg3_restart_hw() releases and re-takes the spin lock,
> we need to do the same because dev_close() needs to
> take netdev_lock().
>
> Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
> Reviewed-by: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
The relocking annotation seems to be in the wrong function. It should
be in tg3_restart_hw(). Other than that,
Reviewed-by: Michael Chan <michael.chan@...adcom.com>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists