diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-04-11 13:06:03 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-04-12 20:09:41 +0200 |
commit | 8ce4269eeedc5b31f5817f610b42cba8be8fa9de (patch) | |
tree | 545f19a5e24e971fa3ac7eaa6a2ac496b9e84945 /io_uring | |
parent | io_uring/kbuf: remove extra ->buf_ring null check (diff) | |
download | linux-8ce4269eeedc5b31f5817f610b42cba8be8fa9de.tar.xz linux-8ce4269eeedc5b31f5817f610b42cba8be8fa9de.zip |
io_uring: add irq lockdep checks
We don't post CQEs from the IRQ context, add a check catching that.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f23f7a24dbe8027b3d37873fece2b6488f878b31.1681210788.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index ef449e43d493..25515d69d205 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -94,6 +94,8 @@ bool io_match_task_safe(struct io_kiocb *head, struct task_struct *task, #define io_lockdep_assert_cq_locked(ctx) \ do { \ + lockdep_assert(in_task()); \ + \ if (ctx->flags & IORING_SETUP_IOPOLL) { \ lockdep_assert_held(&ctx->uring_lock); \ } else if (!ctx->task_complete) { \ |