From: Jens Axboe <axboe@kernel.dk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: io-uring <io-uring@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [GIT PULL] io_uring dma-buf support for 7.4
Date: Tue, 27 Oct 2026 11:49:49 -0600 [thread overview]
Message-ID: <fceefe1d-c513-4cc2-97be-ee2919601f88@kernel.dk> (raw)
In-Reply-To: <CAHk-=whLg-od86aV4HU6yC8EKh6zsVWyyvWVOcrVshvxoQ9dAw@mail.gmail.com>
On 10/27/26 11:45 AM, Linus Torvalds wrote:
> On Sun, 25 Oct 2026 at 03:30, Jens Axboe <axboe@kernel.dk> wrote:
>>
>> This adds native dma-buf support to the I/O path
>
> So while doing the trivial resolution, and looking at the code, I note
> that blkdev_buffered_write() grew a
>
> inode_lock_shared
> ..
> inode_unlock_shared
>
> in it. But looking at the two call sites (in blkdev_write_iter()),
> _one_ of them already has that inode_lock_shared() on what seems to be
> the exact same inode (bdev_file_inode(iocb->ki_filp))
>
> These all went through you in the original block pull:
>
> 1b1be9ea4e34 block: take the inode lock for buffered write fallback
> 2fec4fd97cc3 block: take i_rwsem for the direct I/O write fallback
>
> am I missing something? That nested locking looks not just
> unnecessary, it looks like deadlock city. I'm surprised lockdep hasn't
> complained, but I'm assuming hardly anybody actually uses this path.
Someone did actually report it recently, after it had been in
for-next for a long time. There is a fix queued up for it:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/commit/?h=block-7.4&id=21b88cc8bafceee6c6c82503e3b2cc6f1d0c78bf
since this morning! It'll go out later this week, pre -rc1.
--
Jens Axboe
next prev parent reply other threads:[~2026-10-27 17:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 13:30 [GIT PULL] io_uring dma-buf support for 7.4 Jens Axboe
2026-10-27 17:45 ` Linus Torvalds
2026-10-27 17:49 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-25 13:29 Jens Axboe
2026-10-27 18:11 ` pr-tracker-bot
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=fceefe1d-c513-4cc2-97be-ee2919601f88@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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