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, 14 Feb 2023 08:35:48 -0800
From:   Dan Williams <dan.j.williams@...el.com>
To:     Arnd Bergmann <arnd@...nel.org>,
        Alison Schofield <alison.schofield@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        "Ira Weiny" <ira.weiny@...el.com>,
        Ben Widawsky <bwidawsk@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>
CC:     Arnd Bergmann <arnd@...db.de>, Dave Jiang <dave.jiang@...el.com>,
        "Dan Carpenter" <error27@...il.com>, <linux-cxl@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] cxl: avoid returning uninitialized error code

Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The new cxl_add_to_region() function returns an uninitialized
> value on success:
> 
> drivers/cxl/core/region.c:2628:6: error: variable 'rc' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
>         if (IS_ERR(cxlr)) {
>             ^~~~~~~~~~~~
> drivers/cxl/core/region.c:2654:9: note: uninitialized use occurs here
>         return rc;
> 
> Simplify the logic to have the rc variable always initialized in the
> same place.
> 
> Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Looks good, thanks Arnd.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ