Re: [PATCH] ext4: get rid of ppath in get_ext_path()

From: Greg KH

Date: Thu Jul 02 2026 - 10:15:53 EST


On Fri, Jun 26, 2026 at 01:17:21PM +0800, Wang Jun wrote:
> [ Upstream commit 6b854d552711aa33f59eda334e6d94a00d8825bb ]
>
> The use of path and ppath is now very confusing, so to make the code more
> readable, pass path between functions uniformly, and get rid of ppath.
>
> After getting rid of ppath in get_ext_path(), its caller may pass an error
> pointer to ext4_free_ext_path(), so it needs to teach ext4_free_ext_path()
> and ext4_ext_drop_refs() to skip the error pointer. No functional changes.
>
> Without this fix, ext4_ext_insert_extent() returning ERR_PTR(-ENOSPC) in
> ext4_ext_map_blocks() triggers a kernel Oops, observed via SyzKing
> fuzzing on v6.6.142:
>
> BUG: unable to handle page fault for address: ffffffffffffffec
> R15: ffffffffffffffe4 (= ERR_PTR(-ENOSPC))
> RIP: ext4_ext_drop_refs+0x...->ext4_free_ext_path+0x...->
> ext4_ext_map_blocks+0x509/0x53a0
>
> Signed-off-by: Baokun Li <libaokun1@xxxxxxxxxx>
> Reviewed-by: Jan Kara <jack@xxxxxxx>
> Reviewed-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>
> Tested-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>
> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
> Signed-off-by: Wang Jun <1742789905@xxxxxx>
> ---
> fs/ext4/extents.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

The commit here does not match the upstream commit at all, and is not
documented as such, so obviously you don't want us to take it :)

thanks,

greg k-h