Commit 782977c0 authored by Suma Hegde's avatar Suma Hegde Committed by Greg Kroah-Hartman
Browse files

platform/x86/amd/hsmp: Ensure sock->metric_tbl_addr is non-NULL



commit 2c78fb28 upstream.

If metric table address is not allocated, accessing metrics_bin will
result in a NULL pointer dereference, so add a check.

Fixes: 5150542b ("platform/x86/amd/hsmp: add support for metrics tbl")
Signed-off-by: default avatarSuma Hegde <suma.hegde@amd.com>
Link: https://lore.kernel.org/r/20250807100637.952729-1-suma.hegde@amd.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
[ Minor context change fixed. ]
Signed-off-by: default avatarAlva Lan <alvalan9@foxmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ca44ae51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment