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: <s5hsguprkxf.wl-tiwai@suse.de>
Date:   Thu, 11 Apr 2019 10:43:56 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        broonie@...nel.org, vkoul@...nel.org, gregkh@...uxfoundation.org,
        liam.r.girdwood@...ux.intel.com, jank@...ence.com, joe@...ches.com,
        srinivas.kandagatla@...aro.org,
        Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [PATCH v3 1/5] soundwire: intel: fix inversion in devm_kcalloc parameters

On Thu, 11 Apr 2019 05:16:57 +0200,
Pierre-Louis Bossart wrote:
> 
> the number of elements and size are inverted, fix.
> 
> This probably only worked because the number of properties is
> hard-coded to 1.

Well, both are mathematically equivalent :)


Takashi

> 
> Fixes: 71bb8a1b059e ('soundwire: intel: Add Intel Master driver')
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
> ---
>  drivers/soundwire/intel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
> index fd8d034cfec1..8669b314c476 100644
> --- a/drivers/soundwire/intel.c
> +++ b/drivers/soundwire/intel.c
> @@ -796,8 +796,8 @@ static int intel_prop_read(struct sdw_bus *bus)
>  
>  	/* BIOS is not giving some values correctly. So, lets override them */
>  	bus->prop.num_freq = 1;
> -	bus->prop.freq = devm_kcalloc(bus->dev, sizeof(*bus->prop.freq),
> -					bus->prop.num_freq, GFP_KERNEL);
> +	bus->prop.freq = devm_kcalloc(bus->dev, bus->prop.num_freq,
> +				      sizeof(*bus->prop.freq), GFP_KERNEL);
>  	if (!bus->prop.freq)
>  		return -ENOMEM;
>  
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ