[PATCH 6.6.y] mtd: spi-nor: macronix: Add post_sfdp fixups for Quad Input Page Program
Michael Walle
mwalle at kernel.org
Wed Jul 1 23:44:19 PDT 2026
On Thu Jul 2, 2026 at 4:13 AM CEST, Cheng Ming Lin wrote:
> Hi Sasha,
>
> Sasha Levin <sashal at kernel.org> 於 2026年7月2日週四 上午8:38寫道:
>>
>> I can't take this series for 6.6.y: patch 2 adds flash_info entries
>> with a NULL .name, and 6.6's spi_nor_match_name() has no NULL guard
>> (only added upstream in ac5bfa968b60), so the legacy probe-by-name
>> path can oops at boot.
>
> Thank you for pointing this out and catching the potential issue.
>
> I have verified this, and you are absolutely right. The issue stems from
> the strcmp(name, manufacturers[i]->parts[j].name) evaluation within the
> legacy probe path. Since 6.6.y lacks the null guard, passing a NULL .name
> will result in a null pointer dereference in strcmp() and cause a kernel
> oops during boot.
>
> I will add the .name to the new flash entries and submit a v2 series.
No, please backport the needed patches. The reason is that the name
shouldn't become something an application relies on (it is also
exposed via sysfs).
For all people not too involved: we are dropping the name for new
flash additions, because it is almost always wrong, due to flash id
reuse among almost all flash vendors.
-michael
>
>>
>> Please send a v2 that either names the new entries or backports
>> ac5bfa968b60 first.
>>
>> The 6.12.y series is queued, thanks.
>>
>> --
>> Thanks,
>> Sasha
>
> Thanks,
> Cheng Ming Lin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 297 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20260702/3edd8904/attachment.sig>
More information about the linux-mtd
mailing list