[PATCH 6.6.y] mtd: spi-nor: macronix: Add post_sfdp fixups for Quad Input Page Program

Cheng Ming Lin linchengming884 at gmail.com
Wed Jul 1 19:13:23 PDT 2026


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.

>
> 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



More information about the linux-mtd mailing list