summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-11-11 17:51:30 +0100
committerJens Axboe <axboe@kernel.dk>2022-11-11 17:59:27 +0100
commit5576035f15dfcc6cb1cec236db40c2c0733b0ba4 (patch)
tree174a1468454b450c0048c17fbd5c8a599c078e81
parentio_uring/poll: fix double poll req->flags races (diff)
downloadlinux-5576035f15dfcc6cb1cec236db40c2c0733b0ba4.tar.xz
linux-5576035f15dfcc6cb1cec236db40c2c0733b0ba4.zip
io_uring/poll: lockdep annote io_poll_req_insert_locked
Add a lockdep annotation in io_poll_req_insert_locked(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/8115d8e702733754d0aea119e9b5bb63d1eb8b24.1668184658.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/poll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/poll.c b/io_uring/poll.c
index 97c214aa688c..f500506984ec 100644
--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -116,6 +116,8 @@ static void io_poll_req_insert_locked(struct io_kiocb *req)
struct io_hash_table *table = &req->ctx->cancel_table_locked;
u32 index = hash_long(req->cqe.user_data, table->hash_bits);
+ lockdep_assert_held(&req->ctx->uring_lock);
+
hlist_add_head(&req->hash_node, &table->hbs[index].list);
}