aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-05-10 15:40:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-04 05:59:43 (GMT)
commitb5497a067b9cedb9b0f2475c785ce662f1b8f897 (patch)
treea999c6ad38f12db99a3f54d1dc9c333c2a42d697
parentb78931285473f7258ce7657b4feeff6ff6397b83 (diff)
downloadkernel_replicant_linux-b5497a067b9cedb9b0f2475c785ce662f1b8f897.zip
kernel_replicant_linux-b5497a067b9cedb9b0f2475c785ce662f1b8f897.tar.gz
kernel_replicant_linux-b5497a067b9cedb9b0f2475c785ce662f1b8f897.tar.bz2
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: 2530236303d9e ("net/mlx5_core: Flow steering tree initialization") Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 92df4c7..e29e5be 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -2286,7 +2286,7 @@ static struct mlx5_flow_root_namespace
cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type);
/* Create the root namespace */
- root_ns = kvzalloc(sizeof(*root_ns), GFP_KERNEL);
+ root_ns = kzalloc(sizeof(*root_ns), GFP_KERNEL);
if (!root_ns)
return NULL;