[PATCH v6.6] erofs: fix NULL dereference of dif->bdev_handle in fscache mode

Gao Xiang hsiangkao at linux.alibaba.com
Thu Jun 27 22:36:18 AEST 2024


Hi Greg,

On 2024/6/27 19:16, Greg KH wrote:
> On Thu, Jun 27, 2024 at 05:50:26PM +0800, Gao Xiang wrote:
>>
>>
>> On 2024/6/27 17:35, Gao Xiang wrote:
>>>
>>>
>>> On 2024/6/27 17:11, Hongbo Li wrote:
>>
>> ..
>>
>>>>
>>>> The reason is the same with 8bd90b6ae7856("erofs: fix NULL dereference of dif->bdev_handle in fscache mode") in mainline. So we should backport this
>>>> patch into stable linux-6.6.y to avoid this bug.
>>>
>>> Yes, commit 8bd90b6ae785 should be backported to
>>> Linux 6.6.y LTS immediately.
>>
>> BTW, It seems that
>>
>> commit "erofs: Convert to use bdev_open_by_path()" was
>> backported as a dependency since v6.6.23 even I
>> explicitly commented that this patch is unnecessary
>> and I tend to manually backport instead as below:
>>
>> https://lore.kernel.org/r/ZgDHG8Ucl3EkY4ZS@debian
>>
>>
>> However, my comment was eventually ignored and
>> some other related fix like
>> "erofs: fix NULL dereference of dif->bdev_handle in fscache mode"
>>
>> wasn't backported along with
>> "erofs: Convert to use bdev_open_by_path()"
> 
> Sorry, I missed that somehow, my fault.
> 
>> So the affected 6.6 LTS versions seem to be
>> v6.6.23 ~ v6.6.35 (current)
> 
> So what specifically should we do here?

Thanks for the reply..  Honestly I'd like to revert

block: Provide bdev_open_* functions
erofs: Convert to use bdev_open_by_path()
erofs: fix handling kern_mount() failure

Not quite sure if they can be cleanly reverted, but
since the upstream doen't have 'bdev_handle' anymore,
I will resend a proper backport for
"erofs: fix handling kern_mount() failure".

Thanks,
Gao Xiang

> 
> thanks,
> 
> greg k-h


More information about the Linux-erofs mailing list