Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 21, 2025 at 11:15 PM Jakub Kicinski <kuba@xxxxxxxxxx> 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 <dan.carpenter@xxxxxxxxxx>
> Link: https://lore.kernel.org/dcfd56bc-de32-4b11-9e19-d8bd1543745d@stanley.mountain
> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>

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

BH protection seems strange to me, but this is orthogonal to your fix.





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux