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:   Wed, 3 Feb 2021 23:05:29 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Scott Branden <scott.branden@...adcom.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Desmond Yan <desmond.yan@...adcom.com>,
        Olof Johansson <olof@...om.net>,
        James Hu <james.hu@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] misc: bcm-vk: Fix a couple error codes in probe()

On Wed, Feb 03, 2021 at 11:15:35AM -0800, Scott Branden wrote:
> Thanks Dan,
> 
> On 2021-02-03 6:42 a.m., Dan Carpenter wrote:
> > These errors should return negative error codes instead of returning
> > success.
> Do you have a script running to report such issues or just manually reviewing
> to find such paths?

Yeah.  This is a new Smatch check.  The heuristic is this:

	<-- ret is not set within 3 lines of the goto
	goto label;  <-- we hit a goto


	return 0;  <-- success path right before the cleanup block

label:	<-- labels
	return ret;  <-- This return has to sometimes returns negatives

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ