Commit 406e6db7 authored by YueHaibing's avatar YueHaibing Committed by Saeed Mahameed

net/mlx5e: Use kvfree() in mlx5e_accel_fs_tcp_create()

'accel_tcp' is allocated by kvzalloc(), which should freed by kvfree().

Fixes: f52f2fae ("net/mlx5e: Introduce flow steering API")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent bc59c7d3
...@@ -365,7 +365,7 @@ void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs) ...@@ -365,7 +365,7 @@ void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs)
for (i = 0; i < ACCEL_FS_TCP_NUM_TYPES; i++) for (i = 0; i < ACCEL_FS_TCP_NUM_TYPES; i++)
accel_fs_tcp_destroy_table(fs, i); accel_fs_tcp_destroy_table(fs, i);
kfree(accel_tcp); kvfree(accel_tcp);
mlx5e_fs_set_accel_tcp(fs, NULL); mlx5e_fs_set_accel_tcp(fs, NULL);
} }
...@@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs) ...@@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
err_destroy_tables: err_destroy_tables:
while (--i >= 0) while (--i >= 0)
accel_fs_tcp_destroy_table(fs, i); accel_fs_tcp_destroy_table(fs, i);
kfree(accel_tcp); kvfree(accel_tcp);
mlx5e_fs_set_accel_tcp(fs, NULL); mlx5e_fs_set_accel_tcp(fs, NULL);
return err; return err;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment