]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc()
authorDenis Efremov <efremov@linux.com>
Mon, 21 Sep 2020 16:23:44 +0000 (19:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:26 +0000 (10:11 +0100)
[ Upstream commit 22db4c24452a6681c7e99c6a06b38b5418395bec ]

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: 5e466345291a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c

index 429428bbc903c864c6666f3a203bba0a77b1a43f..b974f3cd10058900d2b290fb78ff64f4523f7e29 100644 (file)
@@ -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;
 }