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: <20210526100730.fsk3khdqmpbbuljf@liuwe-devbox-debian-v2>
Date:   Wed, 26 May 2021 10:07:30 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <decui@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers: hv: Fix missing error code in vmbus_connect()

On Tue, May 25, 2021 at 03:30:22PM +0000, Michael Kelley wrote:
> From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com> Sent: Tuesday, May 25, 2021 3:59 AM
> > 
> > Eliminate the follow smatch warning:
> > 
> > drivers/hv/connection.c:236 vmbus_connect() warn: missing error code
> > 'ret'.
> > 
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> > ---
> >  drivers/hv/connection.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
> > index 311cd00..5e479d5 100644
> > --- a/drivers/hv/connection.c
> > +++ b/drivers/hv/connection.c
> > @@ -232,8 +232,10 @@ int vmbus_connect(void)
> >  	 */
> > 
> >  	for (i = 0; ; i++) {
> > -		if (i == ARRAY_SIZE(vmbus_versions))
> > +		if (i == ARRAY_SIZE(vmbus_versions)) {
> > +			ret = -EDOM;
> >  			goto cleanup;
> > +		}
> > 
> >  		version = vmbus_versions[i];
> >  		if (version > max_version)
> > --
> > 1.8.3.1
> 
> I might have used -EINVAL instead of -EDOM as the error
> return value, but it really doesn't matter, and having a 
> return value that is unique in the function might be helpful.
> 
> Reviewed-by: Michael Kelley <mikelley@...rosoft.com>

Applied to hyperv-fixes. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ