Commit 7f35b42
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: Yunhui Cui <cuiyunhui@bytedance.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250220121716.50324-3-cuiyunhui@bytedance.com
Signed-off-by: Will Deacon <will@kernel.org>1 parent 6eb1e8e commit 7f35b42
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | | - | |
570 | | - | |
| 568 | + | |
571 | 569 | | |
572 | 570 | | |
573 | 571 | | |
| |||
616 | 614 | | |
617 | 615 | | |
618 | 616 | | |
619 | | - | |
| 617 | + | |
620 | 618 | | |
621 | 619 | | |
622 | 620 | | |
623 | 621 | | |
624 | 622 | | |
625 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
626 | 632 | | |
627 | 633 | | |
628 | 634 | | |
629 | 635 | | |
630 | | - | |
| 636 | + | |
631 | 637 | | |
632 | 638 | | |
633 | 639 | | |
| |||
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
645 | | - | |
| 651 | + | |
646 | 652 | | |
647 | 653 | | |
648 | 654 | | |
| |||
0 commit comments