aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-04 13:39:55 +0100
committerJens Axboe <axboe@kernel.dk>2023-04-04 09:30:39 -0600
commit1f2c8f610aa6c6a3dc3523f93eaf28c25051df6f (patch)
treef75b8a937ad5d567951ac042bc1b5b327c6859b7 /io_uring/io_uring.c
parent9eae8655f9cd2eeed99fb7a0d2bb22816c17e497 (diff)
downloadlinux-1f2c8f610aa6c6a3dc3523f93eaf28c25051df6f.tar.gz
io_uring/rsrc: add lockdep sanity checks
We should hold ->uring_lock while putting nodes with io_put_rsrc_node(), add a lockdep check for that. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/b50d5f156ac41450029796738c1dfd22a521df7a.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 419d6f42935f6..da36fa1eeac90 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1002,7 +1002,7 @@ static void __io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
if (rsrc_node) {
io_ring_submit_lock(ctx, issue_flags);
- io_put_rsrc_node(rsrc_node);
+ io_put_rsrc_node(ctx, rsrc_node);
io_ring_submit_unlock(ctx, issue_flags);
}
}
@@ -1123,7 +1123,7 @@ static __cold void io_free_req_tw(struct io_kiocb *req, struct io_tw_state *ts)
if (req->rsrc_node) {
io_tw_lock(ctx, ts);
- io_put_rsrc_node(req->rsrc_node);
+ io_put_rsrc_node(ctx, req->rsrc_node);
}
io_dismantle_req(req);
io_put_task_remote(req->task, 1);