Commit b1c936e
drivers: vxlan: vnifilter: free percpu vni stats on error path
In case rhashtable_lookup_insert_fast() fails inside vxlan_vni_add(), the
allocated percpu vni stats are not freed on the error path.
Introduce vxlan_vni_free() which would work as a nice wrapper to free
vxlan_vni_node resources properly.
Found by Linux Verification Center (linuxtesting.org).
Fixes: 4095e0e ("drivers: vxlan: vnifilter: per vni stats")
Suggested-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 32d0a49 commit b1c936e
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
716 | 722 | | |
717 | 723 | | |
718 | 724 | | |
| |||
740 | 746 | | |
741 | 747 | | |
742 | 748 | | |
743 | | - | |
| 749 | + | |
744 | 750 | | |
745 | 751 | | |
746 | 752 | | |
| |||
763 | 769 | | |
764 | 770 | | |
765 | 771 | | |
766 | | - | |
767 | | - | |
| 772 | + | |
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| |||
0 commit comments