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: <ZsiqasBNAdVWKrjf@black.fi.intel.com>
Date: Fri, 23 Aug 2024 18:27:38 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Yu Jiaoliang <yujiaoliang@...o.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH v1] pinctrl: nomadik: Use kmemdup_array instead of
 kmemdup for multiple allocation

On Wed, Aug 21, 2024 at 02:49:58PM +0800, Yu Jiaoliang wrote:
> Let the kememdup_array() take care about multiplication and possible

kmemdup_array()

> overflows.

...

> +	dup_configs = kmemdup_array(configs, num_configs, sizeof(*dup_configs),
> +				    GFP_KERNEL);

I would even make this a single line.

...

> +	dup_configs = kmemdup_array(configs, num_configs, sizeof(*dup_configs),
> +				    GFP_KERNEL);


Ditto.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ