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: <20200819161323.GA8067@kozik-lap>
Date:   Wed, 19 Aug 2020 18:13:23 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Lukasz Stelmach <l.stelmach@...sung.com>
Cc:     Kukjin Kim <kgene@...nel.org>, Andi Shyti <andi@...zian.org>,
        Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        m.szyprowski@...sung.com, b.zolnierkie@...sung.com
Subject: Re: [PATCH 6/8] spi: spi-s3c64xx: Check return values

On Wed, Aug 19, 2020 at 05:41:43PM +0200, Lukasz Stelmach wrote:
> It was <2020-08-19 śro 14:48>, when Krzysztof Kozlowski wrote:
> > On Wed, Aug 19, 2020 at 02:32:06PM +0200, Łukasz Stelmach wrote:
> >> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
> >> ---
> >>  drivers/spi/spi-s3c64xx.c | 12 ++++++++++++
> >>  1 file changed, 12 insertions(+)
> >
> > Oh, come on, stop fixing the same local issue without fixing bigger
> > picture... or at least documenting why bigger picture does not have to be
> > fixed and simple 'return' is enough.
> >
> > That's the third, same fix for the same problem.
> >
> > https://lore.kernel.org/lkml/20190314064202.14864-1-kjlu@umn.edu/
> > https://lore.kernel.org/lkml/20170207204520.h2eo3yn5kge56lk7@kozik-lap/
> 
> No wonder. There is a possible NULL dereference below. Now at least we
> know something about conditions that led to this.
> 
> Should I drop the entire patch, or just the dmaengine_prep_slave_sg() part?

The best would be to really go through the call stack and handle the
error properly.

This means returning an error code and propagating it further. It is not
a trivial change...

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ