diff options
| author | Jens Axboe <[email protected]> | 2025-01-08 17:28:05 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-01-09 14:16:45 +0000 |
| commit | c9a40292a44e78f71258b8522655bffaf5753bdb (patch) | |
| tree | de3ee6a1d24d45a6f5ea1cac57210014992c9efc /rust/helpers/platform.c | |
| parent | io_uring: silence false positive warnings (diff) | |
| download | kernel-c9a40292a44e78f71258b8522655bffaf5753bdb.tar.gz kernel-c9a40292a44e78f71258b8522655bffaf5753bdb.zip | |
io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period
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: 21a091b970cd ("io_uring: signal registered eventfd to process deferred task work")
Reported-by: Jann Horn <[email protected]>
Cc: [email protected]
Tested-by: Li Zetao <[email protected]>
Reviewed-by: Li Zetao<[email protected]>
Reviewed-by: Prasanna Kumar T S M <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions
