io_uring: unlock if __io_run_local_work locked inside
authorDylan Yudaken <dylany@meta.com>
Thu, 27 Oct 2022 14:44:29 +0000 (07:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Oct 2022 15:52:12 +0000 (09:52 -0600)
commitb3026767e15b488860d4bbf1649d69612bab2c25
tree0331f0cc2950f0b9c4bc0019fb87e2aa51b05ac9
parent8de11cdc96bf58b324c59a28512eb9513fd02553
io_uring: unlock if __io_run_local_work locked inside

It is possible for tw to lock the ring, and this was not propogated out to
io_run_local_work. This can cause an unlock to be missed.

Instead pass a pointer to locked into __io_run_local_work.

Fixes: 8ac5d85a89b4 ("io_uring: add local task_work run helper that is entered locked")
Signed-off-by: Dylan Yudaken <dylany@meta.com>
Link: https://lore.kernel.org/r/20221027144429.3971400-3-dylany@meta.com
[axboe: WARN_ON() -> WARN_ON_ONCE() and add a minor comment]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h