]> git.hungrycats.org Git - linux/commit
drm/amd: check num of link levels when update pcie param
authorLin.Cao <lincao12@amd.com>
Wed, 25 Oct 2023 03:32:41 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2024 14:37:34 +0000 (15:37 +0100)
commit2f2d48b6247ae3001f83c98730b3cce475cb2927
treebae6cf105f93ba28d2e3d3fce953bde57e374274
parent52c81fd0f5a8bf8032687b94ccf00d13b44cc5c8
drm/amd: check num of link levels when update pcie param

commit 406e8845356d18bdf3d3a23b347faf67706472ec upstream.

In SR-IOV environment, the value of pcie_table->num_of_link_levels will
be 0, and num_of_levels - 1 will cause array index out of bounds

Signed-off-by: Lin.Cao <lincao12@amd.com>
Acked-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[ Resolve minor conflicts to fix CVE-2023-52812 ]
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c