Re: [PATCH v3 2/8] EDAC/amd64: Check return value of amd_smn_read()

From: Borislav Petkov
Date: Wed Jun 05 2024 - 05:47:23 EST


On Thu, May 23, 2024 at 01:26:53PM -0500, Yazen Ghannam wrote:
> Check the return value of amd_smn_read() before saving a value. This
> ensures invalid values aren't saved. The struct umc instance is
> initialized to 0 during memory allocation. Therefore, a bad read will
> keep the value as 0 providing the expected Read-as-Zero behavior.
>
> Furthermore, the __must_check attribute will be added to amd_smn_read().
> Therefore, this change is required to avoid compile-time warnings.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx

Not really stable material. Zapped and applied.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette