]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix skb memory leak when TC classifier action offloads are disabled
authorGal Pressman <gal@nvidia.com>
Mon, 13 Dec 2021 09:05:11 +0000 (11:05 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 23 Dec 2021 04:38:48 +0000 (20:38 -0800)
commit17a75ed4a81a2b4073431666578dbfab55e8742c
tree571b6f283756bba26c172deb49e13506b5ecb4a3
parent3ce4e7abe6125eac84221bf0be658c0dd03e4671
net/mlx5e: Fix skb memory leak when TC classifier action offloads are disabled

When TC classifier action offloads are disabled (CONFIG_MLX5_CLS_ACT in
Kconfig), the mlx5e_rep_tc_receive() function which is responsible for
passing the skb to the stack (or freeing it) is defined as a nop, and
results in leaking the skb memory. Replace the nop with a call to
napi_gro_receive() to resolve the leak.

Fixes: 3a86b83dfcfa ("net/mlx5e: Refactor rx handler of represetor device")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.h