public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 4/8] io_uring/rsrc: add lockdep checks
Date: Tue, 11 Apr 2023 12:06:04 +0100	[thread overview]
Message-ID: <961bbe6e433ec9bc0375127f23468b37b729df99.1681210788.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Add a lockdep chek to make sure that file and buffer updates hold
->uring_lock.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 io_uring/rsrc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 603a783a0383..24e4e2109549 100644
--- 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);
-- 
2.40.0


  parent reply	other threads:[~2023-04-11 11:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 11:06 [PATCH 0/8] for-next cleanups Pavel Begunkov
2023-04-11 11:06 ` [PATCH 1/8] io_uring: shut io_prep_async_work warning Pavel Begunkov
2023-04-11 11:06 ` [PATCH 2/8] io_uring/kbuf: remove extra ->buf_ring null check Pavel Begunkov
2023-04-11 11:06 ` [PATCH 3/8] io_uring: add irq lockdep checks Pavel Begunkov
2023-04-11 11:06 ` Pavel Begunkov [this message]
2023-04-11 11:06 ` [PATCH 5/8] io_uring/rsrc: consolidate node caching Pavel Begunkov
2023-04-11 11:06 ` [PATCH 6/8] io_uring/rsrc: zero node's rsrc data on alloc Pavel Begunkov
2023-04-11 11:06 ` [PATCH 7/8] io_uring/rsrc: refactor io_rsrc_node_switch Pavel Begunkov
2023-04-11 11:06 ` [PATCH 8/8] io_uring/rsrc: extract SCM file put helper Pavel Begunkov
2023-04-12 18:10 ` [PATCH 0/8] for-next cleanups Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=961bbe6e433ec9bc0375127f23468b37b729df99.1681210788.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox