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: <6087515.R56niFO833@phil>
Date: Sun, 16 Jun 2024 10:00:07 +0200
From: Heiko Stuebner <heiko@...ech.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Sam Protsenko <semen.protsenko@...aro.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
 linux-samsung-soc@...r.kernel.org,
 Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>,
 Krzysztof Kozlowski <krzk@...nel.org>,
 Sylwester Nawrocki <s.nawrocki@...sung.com>,
 Chanwoo Choi <cw00.choi@...sung.com>, Alim Akhtar <alim.akhtar@...sung.com>,
 Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
Subject: Re: [PATCH v1 2/4] clk: rockchip: Switch to use kmemdup_array()

Am Dienstag, 11. Juni 2024, 15:20:05 CEST schrieb Andy Shevchenko:
> On Fri, Jun 07, 2024 at 10:13:04AM +0200, Heiko Stübner wrote:
> > Am Donnerstag, 6. Juni 2024, 18:09:32 CEST schrieb Andy Shevchenko:
> 
> ...
> 
> > > -		cpuclk->rate_table = kmemdup(rates,
> > > -					     sizeof(*rates) * nrates,
> > > -					     GFP_KERNEL);
> > > +		cpuclk->rate_table = kmemdup_array(rates, nrates, sizeof(*rates),
> > > +						   GFP_KERNEL);
> > 
> > are you sure the param order is correct?
> > 
> > According to [0], it's (src, element_size, count, gfp), while above
> > (and below) element_size and count seems switched in the
> > kmemdup_array calls.
> 
> I'm glad you asked. The parameter order is going to be fixed [1].
> 
> > [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/util.c#n149
> 
> [1]: 0ee14725471c ("mm/util: Swap kmemdup_array() arguments")

ah that clears it up :-)


Thanks for the pointer
Heiko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ