Make poll_refs more robust and protected from overflows. The mechanism description is in 2/2. 1/2 helps to make the second patch a little bit cleaner by tunnelling all edge cases from arming to a tw. A good way to test is to set IO_POLL_REF_BIAS to 0 and 1. 0 will make the slowpath to be hit every single time, and 1 triggers it in case of races. v2: clear the retry flag before vfs_poll() v3: fix not handling arm_poll* refs release edge cases with patch 1/2 Pavel Begunkov (2): io_uring: cmpxchg for poll arm refs release io_uring: make poll refs more robust io_uring/poll.c | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) -- 2.38.1