Commit 622ab65
sfc: fix error unwinds in TC offload
Failure ladders weren't exactly unwinding what the function had done up
to that point; most seriously, when we encountered an already offloaded
rule, the failure path tried to remove the new rule from the hashtable,
which would in fact remove the already-present 'old' rule (since it has
the same key) from the table, and leak its resources.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202305200745.xmIlkqjH-lkp@intel.com/
Fixes: d902e1a ("sfc: bare bones TC offload on EF100")
Fixes: 17654d8 ("sfc: add offloading of 'foreign' TC (decap) rules")
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230530202527.53115-1-edward.cree@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 448a5ce commit 622ab65
1 file changed
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
| 627 | + | |
629 | 628 | | |
630 | 629 | | |
631 | 630 | | |
632 | 631 | | |
633 | | - | |
| 632 | + | |
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
| |||
639 | 638 | | |
640 | 639 | | |
641 | 640 | | |
642 | | - | |
643 | | - | |
| 641 | + | |
644 | 642 | | |
645 | 643 | | |
646 | 644 | | |
647 | 645 | | |
648 | 646 | | |
649 | 647 | | |
650 | 648 | | |
651 | | - | |
| 649 | + | |
652 | 650 | | |
653 | 651 | | |
654 | 652 | | |
655 | 653 | | |
656 | 654 | | |
657 | | - | |
| 655 | + | |
658 | 656 | | |
659 | 657 | | |
660 | 658 | | |
661 | 659 | | |
662 | | - | |
663 | | - | |
| 660 | + | |
664 | 661 | | |
665 | 662 | | |
666 | 663 | | |
667 | 664 | | |
668 | 665 | | |
669 | | - | |
| 666 | + | |
670 | 667 | | |
671 | 668 | | |
672 | 669 | | |
| |||
678 | 675 | | |
679 | 676 | | |
680 | 677 | | |
681 | | - | |
| 678 | + | |
682 | 679 | | |
683 | 680 | | |
684 | 681 | | |
| |||
843 | 840 | | |
844 | 841 | | |
845 | 842 | | |
| 843 | + | |
846 | 844 | | |
847 | 845 | | |
848 | 846 | | |
| |||
899 | 897 | | |
900 | 898 | | |
901 | 899 | | |
902 | | - | |
903 | | - | |
| 900 | + | |
904 | 901 | | |
905 | 902 | | |
906 | 903 | | |
| |||
924 | 921 | | |
925 | 922 | | |
926 | 923 | | |
927 | | - | |
928 | 924 | | |
929 | | - | |
| 925 | + | |
| 926 | + | |
930 | 927 | | |
931 | 928 | | |
932 | 929 | | |
| |||
0 commit comments