[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <161601780806.9052.16136317962549586493.git-patchwork-notify@kernel.org>
Date: Wed, 17 Mar 2021 21:50:08 +0000
From: patchwork-bot+netdevbpf@...nel.org
To: Wei Wang <weiwan@...gle.com>
Cc: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
micron10@...il.com, alexanderduyck@...com, edumazet@...gle.com,
pabeni@...hat.com, hannes@...essinduktion.org
Subject: Re: [PATCH net v4] net: fix race between napi kthread mode and busy poll
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Tue, 16 Mar 2021 15:36:47 -0700 you wrote:
> Currently, napi_thread_wait() checks for NAPI_STATE_SCHED bit to
> determine if the kthread owns this napi and could call napi->poll() on
> it. However, if socket busy poll is enabled, it is possible that the
> busy poll thread grabs this SCHED bit (after the previous napi->poll()
> invokes napi_complete_done() and clears SCHED bit) and tries to poll
> on the same napi. napi_disable() could grab the SCHED bit as well.
> This patch tries to fix this race by adding a new bit
> NAPI_STATE_SCHED_THREADED in napi->state. This bit gets set in
> ____napi_schedule() if the threaded mode is enabled, and gets cleared
> in napi_complete_done(), and we only poll the napi in kthread if this
> bit is set. This helps distinguish the ownership of the napi between
> kthread and other scenarios and fixes the race issue.
>
> [...]
Here is the summary with links:
- [net,v4] net: fix race between napi kthread mode and busy poll
https://git.kernel.org/netdev/net/c/cb038357937e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists