Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0d95806 authored by Parav Pandit's avatar Parav Pandit Committed by Greg Kroah-Hartman
Browse files

net/mlx5: Allocate root ns memory using kzalloc to match kfree



[ Upstream commit 25fa506b70cadb580c1e9cbd836d6417276d4bcd ]

root ns is yet another fs core node which is freed using kfree() by
tree_put_node().
Rest of the other fs core objects are also allocated using kmalloc
variants.

However, root ns memory is allocated using kvzalloc().
Hence allocate root ns memory using kzalloc().

Fixes: 25302363 ("net/mlx5_core: Flow steering tree initialization")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4421d317
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2220,7 +2220,7 @@ static struct mlx5_flow_root_namespace
		cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type);
		cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type);


	/* Create the root namespace */
	/* Create the root namespace */
	root_ns = kvzalloc(sizeof(*root_ns), GFP_KERNEL);
	root_ns = kzalloc(sizeof(*root_ns), GFP_KERNEL);
	if (!root_ns)
	if (!root_ns)
		return NULL;
		return NULL;