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: <HE1PR0502MB3753318D0C380DFEBCD6E452A2410@HE1PR0502MB3753.eurprd05.prod.outlook.com>
Date:   Wed, 4 Jul 2018 19:39:24 +0000
From:   Vadim Pasternak <vadimp@...lanox.com>
To:     Kees Cook <keescook@...omium.org>,
        Darren Hart <dvhart@...radead.org>
CC:     Andy Shevchenko <andy@...radead.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] platform/mellanox: Use 2-factor allocator calls



> -----Original Message-----
> From: Kees Cook [mailto:keescook@...omium.org]
> Sent: Wednesday, July 04, 2018 8:29 PM
> To: Darren Hart <dvhart@...radead.org>
> Cc: Vadim Pasternak <vadimp@...lanox.com>; Andy Shevchenko
> <andy@...radead.org>; platform-driver-x86@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: [PATCH] platform/mellanox: Use 2-factor allocator calls
> 
> As already done treewide, switch from open-coded multiplication to using 2-
> factor allocation helpers.
> 
> Signed-off-by: Kees Cook <keescook@...omium.org>

Acked-by: Vadim Pasternak <vadimp@...lanox.com>

> ---
>  drivers/platform/mellanox/mlxreg-io.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/mellanox/mlxreg-io.c
> b/drivers/platform/mellanox/mlxreg-io.c
> index c192dfe6bd65..acfaf64ffde6 100644
> --- a/drivers/platform/mellanox/mlxreg-io.c
> +++ b/drivers/platform/mellanox/mlxreg-io.c
> @@ -152,8 +152,8 @@ static int mlxreg_io_attr_init(struct mlxreg_io_priv_data
> *priv)  {
>  	int i;
> 
> -	priv->group.attrs = devm_kzalloc(&priv->pdev->dev,
> -					 priv->pdata->counter *
> +	priv->group.attrs = devm_kcalloc(&priv->pdev->dev,
> +					 priv->pdata->counter,
>  					 sizeof(struct attribute *),
>  					 GFP_KERNEL);
>  	if (!priv->group.attrs)
> --
> 2.17.1
> 
> 
> --
> Kees Cook
> Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ