Commit 38358fa
net: airoha: Fix PPE table access in airoha_ppe_debugfs_foe_show()
In order to avoid any possible race we need to hold the ppe_lock
spinlock accessing the hw PPE table. airoha_ppe_foe_get_entry routine is
always executed holding ppe_lock except in airoha_ppe_debugfs_foe_show
routine. Fix the problem introducing airoha_ppe_foe_get_entry_locked
routine.
Fixes: 3fe15c6 ("net: airoha: Introduce PPE debugfs support")
Reviewed-by: Dawid Osuchowski <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/20250731-airoha_ppe_foe_get_entry_locked-v2-1-50efbd8c0fd6@kernel.org
Signed-off-by: Jakub Kicinski <[email protected]>1 parent f8fded7 commit 38358fa
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
512 | | - | |
| 511 | + | |
| 512 | + | |
513 | 513 | | |
| 514 | + | |
| 515 | + | |
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
| |||
537 | 539 | | |
538 | 540 | | |
539 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
540 | 554 | | |
541 | 555 | | |
542 | 556 | | |
| |||
651 | 665 | | |
652 | 666 | | |
653 | 667 | | |
654 | | - | |
| 668 | + | |
655 | 669 | | |
656 | 670 | | |
657 | 671 | | |
| |||
703 | 717 | | |
704 | 718 | | |
705 | 719 | | |
706 | | - | |
| 720 | + | |
707 | 721 | | |
708 | 722 | | |
709 | 723 | | |
| |||
818 | 832 | | |
819 | 833 | | |
820 | 834 | | |
821 | | - | |
| 835 | + | |
822 | 836 | | |
823 | 837 | | |
824 | 838 | | |
| |||
855 | 869 | | |
856 | 870 | | |
857 | 871 | | |
858 | | - | |
| 872 | + | |
859 | 873 | | |
860 | 874 | | |
861 | 875 | | |
| |||
0 commit comments