Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

eventpoll: Annotate data-race of busy_poll_usecs

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.

Fixes: 85455c795c07 ("eventpoll: support busy poll per epoll instance")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Karsten <mkarsten@uwaterloo.ca>
Link: https://lore.kernel.org/r/20240806123301.167557-1-jdamato@fastly.com
Reviewed-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Martin Karsten and committed by
Christian Brauner
b9ca079d 4f98f380

+1 -1
+1 -1
fs/eventpoll.c
··· 420 420 421 421 static bool ep_busy_loop_on(struct eventpoll *ep) 422 422 { 423 - return !!ep->busy_poll_usecs || net_busy_loop_on(); 423 + return !!READ_ONCE(ep->busy_poll_usecs) || net_busy_loop_on(); 424 424 } 425 425 426 426 static bool ep_busy_loop_end(void *p, unsigned long start_time)