Skip to content

Commit

Permalink
io_uring: add irq lockdep checks
Browse files Browse the repository at this point in the history
We don't post CQEs from the IRQ context, add a check catching that.

Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/f23f7a24dbe8027b3d37873fece2b6488f878b31.1681210788.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Apr 12, 2023
1 parent ceac766 commit 8ce4269
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions io_uring/io_uring.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) { \
Expand Down

0 comments on commit 8ce4269

Please sign in to comment.