diff options
author | Martin Karsten <[email protected]> | 2024-08-06 12:33:01 +0000 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-08-30 08:22:34 +0200 |
commit | b9ca079dd6b09e08863aa998edf5c47597806c05 (patch) | |
tree | c1e3592d2b9b3636c8c5092d6d3a3c7410c8f7cb | |
parent | 4f98f380f4662829e394c840062ea677956b57ec (diff) |
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: [email protected]
Signed-off-by: Martin Karsten <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Joe Damato <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r-- | fs/eventpoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 6c0a1e9715ea..145f5349c612 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -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) |