sst-linux/io_uring
Jens Axboe 6b63308c28 io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period
Commit c9a40292a44e78f71258b8522655bffaf5753bdb upstream.

io_eventfd_do_signal() is invoked from an RCU callback, but when
dropping the reference to the io_ev_fd, it calls io_eventfd_free()
directly if the refcount drops to zero. This isn't correct, as any
potential freeing of the io_ev_fd should be deferred another RCU grace
period.

Just call io_eventfd_put() rather than open-code the dec-and-test and
free, which will correctly defer it another RCU grace period.

Fixes: 21a091b970 ("io_uring: signal registered eventfd to process deferred task work")
Reported-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-17 13:34:47 +01:00
..
advise.c
advise.h
alloc_cache.h
cancel.c
cancel.h
epoll.c
epoll.h
fdinfo.c
fdinfo.h
filetable.c
filetable.h
fs.c
fs.h
io_uring.c io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period 2025-01-17 13:34:47 +01:00
io_uring.h io_uring/rw: avoid punting to io-wq directly 2024-12-27 13:53:02 +01:00
io-wq.c
io-wq.h
kbuf.c
kbuf.h
Makefile
msg_ring.c
msg_ring.h
net.c
net.h
nop.c
nop.h
notif.c
notif.h
opdef.c
opdef.h
openclose.c
openclose.h
poll.c
poll.h
refs.h
rsrc.c
rsrc.h
rw.c io_uring/rw: avoid punting to io-wq directly 2024-12-27 13:53:02 +01:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring/sqpoll: fix sqpoll error handling races 2025-01-02 10:30:54 +01:00
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c io_uring/tctx: work around xa_store() allocation error issue 2024-12-14 19:54:49 +01:00
tctx.h
timeout.c
timeout.h
uring_cmd.c
uring_cmd.h
xattr.c
xattr.h