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:   Sat, 13 Nov 2021 19:00:11 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Alexandru Tachici <alexandru.tachici@...log.com>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH 3/5] iio: adc: ad_sigma_delta: Add sequencer support

On Fri, Nov 12, 2021 at 7:10 PM Jonathan Cameron <jic23@...nel.org> wrote:
> On Wed, 10 Nov 2021 13:17:48 +0200
> <alexandru.tachici@...log.com> wrote:


> > +     kfree(sigma_delta->samples_buf);
>
> krealloc() preferred.   It might not be necessary to actually do an allocation after all
> if we happen to have one we can already use.

Looking at below, shouldn't it be krealloc_array()?

> > +     sigma_delta->samples_buf = kzalloc(slot * indio_dev->channels[0].scan_type.storagebits,
> > +                                        GFP_KERNEL);


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ