lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06072721-31f7-49d8-05b8-19d37fae2061@gmail.com>
Date:   Sun, 21 Feb 2021 17:12:34 +0200
From:   Tariq Toukan <ttoukan.linux@...il.com>
To:     Chuhong Yuan <hslester96@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        Jack Morgenstein <jackm@....mellanox.co.il>,
        Moni Shoua <monis@...lanox.com>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/mlx4_core: Add missed mlx4_free_cmd_mailbox()



On 2/21/2021 4:35 PM, Chuhong Yuan wrote:
> mlx4_do_mirror_rule() forgets to call mlx4_free_cmd_mailbox() to
> free the memory region allocated by mlx4_alloc_cmd_mailbox() before
> an exit.
> Add the missed call to fix it.
> 
> Fixes: 78efed275117 ("net/mlx4_core: Support mirroring VF DMFS rules on both ports")
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> index 394f43add85c..a99e71bc7b3c 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> @@ -4986,6 +4986,7 @@ static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule
>   
>   	if (!fs_rule->mirr_mbox) {
>   		mlx4_err(dev, "rule mirroring mailbox is null\n");
> +		mlx4_free_cmd_mailbox(dev, mailbox);
>   		return -EINVAL;
>   	}
>   	memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size);
> 

Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Thanks for your patch.
Tariq

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ