Skip to content

poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()

Oleg Nesterov io-uring lkml netdev 1 version Applied

Status from this message: Applied to the vfs-6.14.poll branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()include/linux/poll.h+9 -10 replies
2/5poll_wait: kill the obsolete wait_address checkinclude/linux/poll.h+1 -10 replies
3/5io_uring_poll: kill the no longer necessary barrier after poll_wait()io_uring/io_uring.c+4 -50 replies
4/5sock_poll_wait: kill the no longer necessary barrier after poll_wait()include/net/sock.h+7 -100 replies
5/5poll: kill poll_does_not_wait()include/linux/poll.h+3 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()

Linus,

I misread fs/eventpoll.c, it has the same problem. And more __pollwait()-like functions, for example p9_pollwait(). So 1/5 adds mb() into poll_wait(), not into __pollwait().

WangYuli, after 1/5 we can reconsider your patch.

Oleg.
---

 include/linux/poll.h | 26 ++++++++++++--------------
 include/net/sock.h   | 17 +++++++----------
 io_uring/io_uring.c  |  9 ++++-----
 3 files changed, 23 insertions(+), 29 deletions(-)