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]
Date:   Sun, 22 Mar 2020 17:01:31 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc:     <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <lars@...afoo.de>, <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v2] iio: buffer: re-introduce bitmap_zalloc() for
 trialmask

On Sat, 21 Mar 2020 10:59:56 +0200
Alexandru Ardelean <alexandru.ardelean@...log.com> wrote:

> Commit 3862828a903d3 ("iio: buffer: Switch to bitmap_zalloc()") introduced
> bitmap_alloc(), but commit 20ea39ef9f2f9 ("iio: Fix scan mask selection")
> reverted it.
> 
> This change adds it back. The only difference is that it's adding
> bitmap_zalloc(). There might be some changes later that would require
> initializing it to zero. In any case, now it's already zero-ing the
> trialmask.
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke it.

Thanks,

Jonathan
> ---
> 
> Changelog v1 -> v2:
> * add 'Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>' 
> * re-send from an Analog server; GMail changed the author to @gmail.com
> 
>  drivers/iio/industrialio-buffer.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 4ada5592aa2b..5ff34ce8b6a2 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -316,8 +316,7 @@ static int iio_scan_mask_set(struct iio_dev *indio_dev,
>  	const unsigned long *mask;
>  	unsigned long *trialmask;
>  
> -	trialmask = kcalloc(BITS_TO_LONGS(indio_dev->masklength),
> -			    sizeof(*trialmask), GFP_KERNEL);
> +	trialmask = bitmap_zalloc(indio_dev->masklength, GFP_KERNEL);
>  	if (trialmask == NULL)
>  		return -ENOMEM;
>  	if (!indio_dev->masklength) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ