Commit aa9c44b
net/mlx5e: Fix leak of Geneve TLV option object
Previously, a unique tunnel id was added for the matching on TC
non-zero chains, to support inner header rewrite with goto action.
Later, it was used to support VF tunnel offload for vxlan, then for
Geneve and GRE. To support VF tunnel, a temporary mlx5_flow_spec is
used to parse tunnel options. For Geneve, if there is TLV option, a
object is created, or refcnt is added if already exists. But the
temporary mlx5_flow_spec is directly freed after parsing, which causes
the leak because no information regarding the object is saved in
flow's mlx5_flow_spec, which is used to free the object when deleting
the flow.
To fix the leak, call mlx5_geneve_tlv_option_del() before free the
temporary spec if it has TLV object.
Fixes: 521933c ("net/mlx5e: Support Geneve and GRE with VF tunnel offload")
Signed-off-by: Jianbo Liu <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Reviewed-by: Alex Lazar <[email protected]>
Signed-off-by: Mark Bloch <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent b833582 commit aa9c44b
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2028 | 2028 | | |
2029 | 2029 | | |
2030 | 2030 | | |
2031 | | - | |
| 2031 | + | |
2032 | 2032 | | |
2033 | | - | |
2034 | 2033 | | |
2035 | 2034 | | |
2036 | 2035 | | |
| |||
2069 | 2068 | | |
2070 | 2069 | | |
2071 | 2070 | | |
2072 | | - | |
| 2071 | + | |
2073 | 2072 | | |
2074 | 2073 | | |
2075 | 2074 | | |
| |||
2574 | 2573 | | |
2575 | 2574 | | |
2576 | 2575 | | |
2577 | | - | |
2578 | 2576 | | |
2579 | 2577 | | |
2580 | | - | |
| 2578 | + | |
| 2579 | + | |
2581 | 2580 | | |
2582 | | - | |
| 2581 | + | |
| 2582 | + | |
2583 | 2583 | | |
2584 | 2584 | | |
2585 | 2585 | | |
| |||
0 commit comments