Skip to content

Commit 8ce4269

Browse files
isilenceaxboe
authored andcommitted
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>
1 parent ceac766 commit 8ce4269

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

io_uring/io_uring.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ bool io_match_task_safe(struct io_kiocb *head, struct task_struct *task,
9494

9595
#define io_lockdep_assert_cq_locked(ctx) \
9696
do { \
97+
lockdep_assert(in_task()); \
98+
\
9799
if (ctx->flags & IORING_SETUP_IOPOLL) { \
98100
lockdep_assert_held(&ctx->uring_lock); \
99101
} else if (!ctx->task_complete) { \

0 commit comments

Comments
 (0)