Re: [PATCH v2] ext4: skip split extent recovery on corruption

From: Theodore Ts'o

Date: Sat Mar 28 2026 - 01:32:21 EST



On Tue, 24 Mar 2026 09:58:15 +0800, hongao wrote:
> ext4_split_extent_at() retries after ext4_ext_insert_extent() fails by
> refinding the original extent and restoring its length. That recovery is
> only safe for transient resource failures such as -ENOSPC, -EDQUOT, and
> -ENOMEM.
>
> When ext4_ext_insert_extent() fails because the extent tree is already
> corrupted, ext4_find_extent() can return a leaf path without p_ext.
> ext4_split_extent_at() then dereferences path[depth].p_ext while trying to
> fix up the original extent length, causing a NULL pointer dereference while
> handling a pre-existing filesystem corruption.
>
> [...]

Applied, thanks!

[1/1] ext4: skip split extent recovery on corruption
commit: 3ceda17325fc2600f66fd85b526592bc8a9dfb9d

Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>