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] [day] [month] [year] [list]
Message-ID: <20221204143613.310ed016@jic23-huawei>
Date:   Sun, 4 Dec 2022 14:36:13 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Michal Simek <michal.simek@....com>
Cc:     Marco Pagani <marpagan@...hat.com>,
        Anand Ashok Dumbre <anand.ashok.dumbre@...inx.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Michal Simek <michal.simek@...inx.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>,
        Manish Narani <manish.narani@...inx.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        <linux-iio@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <llvm@...ts.linux.dev>
Subject: Re: [PATCH] iio: adc: xilinx-ams: fix devm_krealloc() return value
 check

On Wed, 30 Nov 2022 18:04:26 +0100
Michal Simek <michal.simek@....com> wrote:

> On 11/25/22 12:31, Marco Pagani wrote:
> > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> > 
> > 
> > The clang-analyzer reported a warning: "Value stored to 'ret'
> > is never read".
> > 
> > Fix the return value check if devm_krealloc() fails to resize
> > ams_channels.
> > 
> > Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
> > Signed-off-by: Marco Pagani <marpagan@...hat.com>
> > ---
> >   drivers/iio/adc/xilinx-ams.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
> > index 5b4bdf3a26bb..a507d2e17079 100644
> > --- a/drivers/iio/adc/xilinx-ams.c
> > +++ b/drivers/iio/adc/xilinx-ams.c
> > @@ -1329,7 +1329,7 @@ static int ams_parse_firmware(struct iio_dev *indio_dev)
> > 
> >          dev_channels = devm_krealloc(dev, ams_channels, dev_size, GFP_KERNEL);
> >          if (!dev_channels)
> > -               ret = -ENOMEM;
> > +               return -ENOMEM;
> > 
> >          indio_dev->channels = dev_channels;
> >          indio_dev->num_channels = num_channels;
> > --
> > 2.38.1
> >   
> 
> Acked-by: Michal Simek <michal.simek@....com>

Applied to the fixes-togreg branch of iio.git.  Given merge window opening soon
it might be a few weeks before this goes upstream.

Thanks,

Jonathan

> 
> Thanks,
> Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ