]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86/amd/hsmp: Ensure sock->metric_tbl_addr is non-NULL
authorSuma Hegde <suma.hegde@amd.com>
Thu, 7 Aug 2025 10:06:37 +0000 (10:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:43 +0000 (16:34 +0200)
commitd47782d5c0cb87b9826041f34505580204ccf703
treed5899461430e4c05355e57bbcec5b7c01df08595
parent7c626f6cb0e013bf82376a1234ac8c66ab78da4f
platform/x86/amd/hsmp: Ensure sock->metric_tbl_addr is non-NULL

[ Upstream commit 2c78fb287e1f430b929f2e49786518350d15605c ]

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

Fixes: 5150542b8ec5 ("platform/x86/amd/hsmp: add support for metrics tbl")
Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Link: https://lore.kernel.org/r/20250807100637.952729-1-suma.hegde@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/amd/hsmp/hsmp.c