]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:54:30 +0000 (10:54 +0200)
commit33c93f9bccb6ed9c0a3665f07d1b2029d871d36d
tree18f2377258cceec96cd897922210abbfa4befc0f
parentc969b8b38fd71c44cbae426f7b513e0cd9496f5d
net/mlx5e: Fix skb memory leak when TC classifier action offloads are disabled

BugLink: https://bugs.launchpad.net/bugs/1983498
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: 28e7606fa8f1 ("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>
(cherry picked from commit a0cb909644c36230a3c48904d14b91732de79fc0)
Signed-off-by: Zachary Tahenakos <zachary.tahenakos@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.h