[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6854c959a2ff5d8493e97982cd3bb8ee5ec7789.camel@mellanox.com>
Date: Wed, 6 Nov 2019 06:24:25 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: Parav Pandit <parav@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"colin.king@...onical.com" <colin.king@...onical.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"leon@...nel.org" <leon@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] net/mlx5: fix kvfree of uninitialized pointer spec
On Tue, 2019-11-05 at 18:27 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently when a call to esw_vport_create_legacy_ingress_acl_group
> fails the error exit path to label 'out' will cause a kvfree on the
> uninitialized pointer spec. Fix this by ensuring pointer spec is
> initialized to NULL to avoid this issue.
>
> Addresses-Coverity: ("Uninitialized pointer read")
> Fixes: 10652f39943e ("net/mlx5: Refactor ingress acl configuration")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> index 7baade9e62b7..f2e400a23a59 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> @@ -1253,7 +1253,7 @@ static int esw_vport_ingress_config(struct
> mlx5_eswitch *esw,
> struct mlx5_flow_destination drop_ctr_dst = {0};
> struct mlx5_flow_destination *dst = NULL;
> struct mlx5_flow_act flow_act = {0};
> - struct mlx5_flow_spec *spec;
> + struct mlx5_flow_spec *spec = NULL;
> int dest_num = 0;
> int err = 0;
> u8 *smac_v;
Applied to mlx5-next.
Thanks!
Powered by blists - more mailing lists