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]
Date:   Tue, 20 Apr 2021 17:33:12 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Mark Brown <broonie@...nel.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] spi: Don't overwrite num_chipselect with error code

On Tue, Apr 20, 2021 at 4:19 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> The code currently organized in a way that num_chipselect is overwritten
> each time we call spi_get_gpio_descs(). It might be potentially dangerous
> in case when the gpiod_count() returns an error code.
>
> Note, that gpiod_count() never returns 0, take this into account as well.
>
> Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs")

It doesn't fix anything. I missed the max_t(int).
In any case it makes error handling cleaner, so I'll reformulate the
commit message in v2 and drop Fixes tag.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ