projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ce4269
)
io_uring/rsrc: add lockdep checks
author
Pavel Begunkov
<asml.silence@gmail.com>
Tue, 11 Apr 2023 11:06:04 +0000
(12:06 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 12 Apr 2023 18:09:41 +0000
(12:09 -0600)
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>
io_uring/rsrc.c
patch
|
blob
|
history
diff --git
a/io_uring/rsrc.c
b/io_uring/rsrc.c
index
603a783
..
24e4e21
100644
(file)
--- a/
io_uring/rsrc.c
+++ b/
io_uring/rsrc.c
@@
-534,6
+534,8
@@
static int __io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned type,
__u32 tmp;
int err;
+ lockdep_assert_held(&ctx->uring_lock);
+
if (check_add_overflow(up->offset, nr_args, &tmp))
return -EOVERFLOW;
err = io_rsrc_node_switch_start(ctx);