Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

From: OGAWA Hirofumi
Date: Mon Aug 31 2020 - 13:16:57 EST


Jens Axboe <axboe@xxxxxxxxx> writes:

> On 8/31/20 10:37 AM, OGAWA Hirofumi wrote:
>> Jens Axboe <axboe@xxxxxxxxx> writes:
>>
>>> I don't think we should work-around this here. What device is this on?
>>> Something like the below may help.
>>
>> The reported bug is from nvme stack, and the below patch (I submitted
>> same patch to you) fixed the reported case though. But I didn't verify
>> all possible path, so I'd liked to use safer side.
>>
>> If block layer can guarantee io_pages!=0 instead, and can apply to
>> stable branch (5.8+). It would work too.
>
> We really should ensure that ->io_pages is always set, imho, instead of
> having to work-around it in other spots.

I think it is good too. However, the issue would be how to do it for
stable branch.

If you think that block layer patch is enough and submit to stable
(5.8+) branch instead, I'm fine without fatfs patch. (Or removing
workaround in fatfs with block layer patch later?)

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>