Commit 7f35b429 authored by Yunhui Cui's avatar Yunhui Cui Committed by Will Deacon
Browse files

perf/dwc_pcie: fix duplicate pci_dev devices



During platform_device_register, wrongly using struct device
pci_dev as platform_data caused a kmemdup copy of pci_dev. Worse
still, accessing the duplicated device leads to list corruption as its
mutex content (e.g., list, magic) remains the same as the original.

Signed-off-by: default avatarYunhui Cui <cuiyunhui@bytedance.com>
Reviewed-by: default avatarShuai Xue <xueshuai@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250220121716.50324-3-cuiyunhui@bytedance.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 6eb1e8ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment