Re: [PATCH RESEND V2] block: fix BLKSECDISCARD zero-length range causing page cache invalidation

From: Jens Axboe

Date: Fri Nov 27 2026 - 21:49:12 EST



On Mon, 02 Nov 2026 16:04:20 +0800, Zizhi Wo wrote:
> Commit 697ba0b6ec4a ("block: fix integer overflow in BLKSECDISCARD") fixed
> the start+len overflow via check_add_overflow() but did not handle the
> start=0, len=0 case. There, start + len = 0, so end = 0 passes all checks,
> and truncate_bdev_range()->truncate_inode_pages_range() is then called with
> lend=UINT64_MAX, whitch is the "truncate to the end of file" sentinel, so
> the entire page cache is invalidated.
>
> [...]

Applied, thanks!

[1/1] block: fix BLKSECDISCARD zero-length range causing page cache invalidation
commit: aea1c2ec03b399434ff1bafbb2f0d5076f74ce03

Best regards,
--
Jens Axboe