OSDN Git Service

net/mlx5: Allocate root ns memory using kzalloc to match kfree
authorParav Pandit <parav@mellanox.com>
Fri, 10 May 2019 15:40:08 +0000 (10:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 06:02:33 +0000 (08:02 +0200)
commite0d95806b05d2cf0fe90707596a00b239fc8d69e
treec520f7064cb47d23302f4c64e8dba94ec861e163
parent4421d31753ecb45321be2341380e47c93d678ec5
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>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c