Skip to content

Commit

Permalink
net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc()
Browse files Browse the repository at this point in the history
Variables flow_group_in, spec in rx_fs_create() are allocated with
kvzalloc(). It's incorrect to free them with kfree(). Use kvfree()
instead.

Fixes: 5e46634 ("net/mlx5e: IPsec: Add IPsec steering in local NIC RX")
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Denis Efremov authored and Saeed Mahameed committed Sep 23, 2020
1 parent 670c239 commit 22db4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ static int rx_fs_create(struct mlx5e_priv *priv,
fs_prot->miss_rule = miss_rule;

out:
kfree(flow_group_in);
kfree(spec);
kvfree(flow_group_in);
kvfree(spec);
return err;
}

Expand Down

0 comments on commit 22db4c2

Please sign in to comment.