Skip to content

Commit 786788a

Browse files
isilenceaxboe
authored andcommitted
io_uring/rsrc: add lockdep checks
Add a lockdep chek to make sure that file and buffer updates hold ->uring_lock. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/961bbe6e433ec9bc0375127f23468b37b729df99.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 8ce4269 commit 786788a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

io_uring/rsrc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ static int __io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned type,
534534
__u32 tmp;
535535
int err;
536536

537+
lockdep_assert_held(&ctx->uring_lock);
538+
537539
if (check_add_overflow(up->offset, nr_args, &tmp))
538540
return -EOVERFLOW;
539541
err = io_rsrc_node_switch_start(ctx);

0 commit comments

Comments
 (0)