From: Keith Busch <kbusch@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
syzbot+cc0de396bac84da51919@syzkaller.appspotmail.com,
Hannes Reinecke <hare@kernel.org>
Subject: Re: [PATCH] loop: Fix recently introduced lock inversion
Date: Thu, 13 Aug 2026 10:18:49 -0600 [thread overview]
Message-ID: <an3uafT_p6VOdP4V@kbusch-mbp> (raw)
In-Reply-To: <d919f5285d16afbec6c51ecdf201692a484566e5.1786637565.git.bvanassche@acm.org>
On Thu, Aug 13, 2026 at 04:14:20PM +0000, Bart Van Assche wrote:
> All block driver code except loop_set_dio() calls
> queue_limits_start_update() before it freezes the request queue. Make
> loop_set_dio() follow this convention. This patch fixes the following
> lockdep complaint:
>
> ======================================================
> WARNING: possible circular locking dependency detected
> 7.2.0-rc5-dbg #11 Not tainted
> ------------------------------------------------------
> losetup/2924 is trying to acquire lock:
> ffff88816c76da68 (&q->limits_lock){+.+.}-{4:4}, at: loop_set_dio+0x318/0x720 [loop]
>
> but task is already holding lock:
> ffff88816c76d430 (&q->q_usage_counter(io)#24){++++}-{0:0}, at: blk_mq_freeze_queue_nomemsave+0x1a/0x30
>
> which lock already depends on the new lock.
Thanks, looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
prev parent reply other threads:[~2026-08-13 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 16:14 [PATCH] loop: Fix recently introduced lock inversion Bart Van Assche
2026-08-13 16:18 ` Keith Busch [this message]
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=an3uafT_p6VOdP4V@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=syzbot+cc0de396bac84da51919@syzkaller.appspotmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.