eventpoll: Annotate data-race of busy_poll_usecs
Subsystems (4)
PATCH 1/1 eventpoll: Annotate data-race of busy_poll_usecs
From: Martin Karsten <[email protected]>
A struct eventpoll's busy_poll_usecs field can be modified via a user ioctl at any time. All reads of this field should be annotated with READ_ONCE.
--- fs/eventpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/eventpoll.c +1 -1
@@ -420,7 +420,7 @@ static bool busy_loop_ep_timeout(unsigned long start_time,static bool ep_busy_loop_on (struct eventpoll *ep) { -return !!ep->busy_poll_usecs ||net_busy_loop_on (); +return !!READ_ONCE (ep->busy_poll_usecs) ||net_busy_loop_on (); }static bool ep_busy_loop_end (void *p,unsigned long start_time)
Signature · 1 line
2.25.1
Jakub Kicinski
maintainerQuoted 10 lines · On Tue, 6 Aug 2024 12:33:01 +0000 Joe Damato wrote:
From: Martin Karsten <[email protected]>
A struct eventpoll's
busy_poll_usecsfield can be modified via a user ioctl at any time. All reads of this field should be annotated withREAD_ONCE.Fixes 85455c795c07 ("eventpoll: support busy poll per epoll instance")Signed-off-by Martin Karsten <[email protected]>Reviewed-by Joe Damato <[email protected]>
Christian took the net-next cleanup, I presume he'll take this too.
Signature · 1 line
pw-bot: not-applicable
Quoted 5 lines · Joe Damato
A struct eventpoll's
busy_poll_usecsfield can be modified via a user ioctl at any time. All reads of this field should be annotated withREAD_ONCE.
Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc
[1/1] eventpoll: Annotate data-race of busy_poll_usecs
https://git.kernel.org/vfs/vfs/c/b4988e3bd1f0