x86/cpu: Avoid running off the end of an AMD erratum table
authorDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Apr 2025 13:58:37 +0000 (06:58 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Apr 2025 14:57:16 +0000 (07:57 -0700)
commitf0df00ebc57f803603f2a2e0df197e51f06fbe90
tree6f127c42e6ad5404060cc899eefbc313dc665d67
parent254a6d14c9c952e8eae0fafd4fed3778721b948e
x86/cpu: Avoid running off the end of an AMD erratum table

The NULL array terminator at the end of erratum_1386_microcode was
removed during the switch from x86_cpu_desc to x86_cpu_id. This
causes readers to run off the end of the array.

Replace the NULL.

Fixes: f3f325152673 ("x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'")
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
arch/x86/kernel/cpu/amd.c