]>
Commit | Line | Data |
---|---|---|
e201c2e6 GKH |
1 | From foo@baz Fri 31 May 2019 03:21:27 PM PDT |
2 | From: Parav Pandit <parav@mellanox.com> | |
3 | Date: Fri, 10 May 2019 10:40:08 -0500 | |
4 | Subject: net/mlx5: Allocate root ns memory using kzalloc to match kfree | |
5 | ||
6 | From: Parav Pandit <parav@mellanox.com> | |
7 | ||
8 | [ Upstream commit 25fa506b70cadb580c1e9cbd836d6417276d4bcd ] | |
9 | ||
10 | root ns is yet another fs core node which is freed using kfree() by | |
11 | tree_put_node(). | |
12 | Rest of the other fs core objects are also allocated using kmalloc | |
13 | variants. | |
14 | ||
15 | However, root ns memory is allocated using kvzalloc(). | |
16 | Hence allocate root ns memory using kzalloc(). | |
17 | ||
18 | Fixes: 2530236303d9e ("net/mlx5_core: Flow steering tree initialization") | |
19 | Signed-off-by: Parav Pandit <parav@mellanox.com> | |
20 | Reviewed-by: Daniel Jurgens <danielj@mellanox.com> | |
21 | Reviewed-by: Mark Bloch <markb@mellanox.com> | |
22 | Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- | |
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
27 | ||
28 | --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |
29 | +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |
30 | @@ -2220,7 +2220,7 @@ static struct mlx5_flow_root_namespace | |
31 | cmds = mlx5_fs_cmd_get_default_ipsec_fpga_cmds(table_type); | |
32 | ||
33 | /* Create the root namespace */ | |
34 | - root_ns = kvzalloc(sizeof(*root_ns), GFP_KERNEL); | |
35 | + root_ns = kzalloc(sizeof(*root_ns), GFP_KERNEL); | |
36 | if (!root_ns) | |
37 | return NULL; | |
38 |