]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix invalid flags for io_put_kbuf()
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 25 Mar 2022 13:00:42 +0000 (13:00 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Mar 2022 13:43:53 +0000 (07:43 -0600)
commit71ee04221e3b3cce6db232ff6ea532aa79a6147b
tree4eaac3d966820818d3af4f9b7503d36ecf9fa06a
parentd3043aafc175357d1ac31f542b1a8eda20bd2c92
io_uring: fix invalid flags for io_put_kbuf()

io_req_complete_failed() doesn't require callers to hold ->uring_lock,
use IO_URING_F_UNLOCKED version of io_put_kbuf(). The only affected
place is the fail path of io_apoll_task_func(). Also add a lockdep
annotation to catch such bugs in the future.

Fixes: 786d9b76a8d48 ("io_uring: extend provided buf return to fails")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/ccf602dbf8df3b6a8552a262d8ee0a13a086fbc7.1648212967.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c