From: ThangNN99 <ngocthang2710.1999@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
libaokun@linux.alibaba.com, ojaswin@linux.ibm.com,
ritesh.list@gmail.com, yi.zhang@huawei.com,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: avoid buffer/folio lock inversion in __ext4_get_inode_loc()
Date: Mon, 7 Sep 2026 22:50:02 +0700 [thread overview]
Message-ID: <20260907155002.75237-1-ngocthang2710.1999@gmail.com> (raw)
In-Reply-To: <20260906104841.56075-1-ngocthang2710.1999@gmail.com>
Hi Jan,
Yes, your understanding is correct: with foliosize == blocksize the
itable block and the bitmap block can never share a folio, so the two
lock orders can't overlap. It's only once foliosize > blocksize that
the itable block being written back can land in the same folio as the
bitmap block being probed, opening the window for the deadlock.
Thanks for the clearer write-up of the two lock orders, I've folded it
into the v2 changelog, along with your Reviewed-by tag and the
Assisted-by: LLM tag in place of the previous Co-Authored-By line.
Agreed on the broader concern -- sb_getblk() called while holding
another buffer locked is a general hazard, not specific to this one
call site. I don't have another confirmed instance yet; happy to help
grep for more if useful, but wanted to get this one fix out first
rather than block it on a wider audit.
Sending v2 now.
Thanks,
Thang
next prev parent reply other threads:[~2026-09-07 15:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 10:48 ThangNN99
2026-09-07 9:15 ` Jan Kara
2026-09-07 15:50 ` ThangNN99 [this message]
2026-09-07 15:50 ` [PATCH v2 v2] " ThangNN99
2026-09-11 17:02 ` [PATCH " Nguyen Ngoc Thang
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=20260907155002.75237-1-ngocthang2710.1999@gmail.com \
--to=ngocthang2710.1999@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=jack@suse.cz \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®