net/mlx5e: Fix freeing flow with kfree() and not kvfree()
authorRoi Dayan <roid@mellanox.com>
Wed, 4 Dec 2019 09:25:43 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2019 15:09:03 +0000 (16:09 +0100)
[ Upstream commit a23dae79fb6555c808528707c6389345d0b0c189 ]

Flows are allocated with kzalloc() so free with kfree().

Fixes: 04de7dda7394 ("net/mlx5e: Infrastructure for duplicated offloading of TC flows")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Eli Britstein <elibr@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/en_tc.c

index f90a9f8e0fc6a33fa1c1d2ee56ff6da42af412ce..c2c7f214a56a065b7bc241efe3ecbe5f9f4819ac 100644 (file)
@@ -1616,7 +1616,7 @@ static void __mlx5e_tc_del_fdb_peer_flow(struct mlx5e_tc_flow *flow)
        flow_flag_clear(flow, DUP);
 
        mlx5e_tc_del_fdb_flow(flow->peer_flow->priv, flow->peer_flow);
-       kvfree(flow->peer_flow);
+       kfree(flow->peer_flow);
        flow->peer_flow = NULL;
 }