In the Linux kernel, the following vulnerability has been resolved:
io_uring: always do atomic put from iowq
iouring always switches requests to atomic refcounting for iowq execution before there is any parallilism by setting REQF_REFCOUNT, and the flag is not cleared until the request completes. That should be fine as long as the compiler doesn't make up a non existing value for the flags, however KCSAN still complains when the request owner changes oter flag bits:
BUG: KCSAN: data-race in ioreqtaskcancel / iowqfreework ... read to 0xffff888117207448 of 8 bytes by task 3871 on cpu 0: reqrefputandtest io_uring/refs.h:22 [inline]
Skip REQFREFCOUNT checks for iowq, we know it's set.