Thread (24 messages) 24 messages, 5 authors, 2025-01-23

Re: [PATCH net-next 7/7] wifi: mt76: move napi_enable() from under BH

From: Eric Dumazet <edumazet@google.com>
Date: 2025-01-22 14:25:59
Also in: linux-wireless

On Tue, Jan 21, 2025 at 11:15 PM Jakub Kicinski [off-list ref] wrote:
mt76 does a lot of:

  local_bh_disable();
  napi_enable(...napi);
  napi_schedule(...napi);
  local_bh_enable();

local_bh_disable() is not a real lock, its most likely taken
because napi_schedule() requires it. napi_enable() needs
to take a mutex, so move it from under the BH protection.

Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Reported-by: Dan Carpenter <redacted>
Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain (local)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>

napi_schedule() can run from arbitrary contexts though...

BH protection seems strange to me, but this is orthogonal to your fix.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help