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, 16 May 2017 11:35:02 -0700 (PDT)
From:   Stefano Stabellini <sstabellini@...nel.org>
To:     Wei Yongjun <weiyj.lk@...il.com>
cc:     Eric Van Hensbergen <ericvh@...il.com>,
        Ron Minnich <rminnich@...dia.gov>,
        Latchesar Ionkov <lucho@...kov.net>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Juergen Gross <jgross@...e.com>,
        Wei Yongjun <weiyongjun1@...wei.com>,
        v9fs-developer@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [PATCH] xen/9pfs: fix return value check in
 xen_9pfs_front_probe()

On Tue, 16 May 2017, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@...wei.com>
> 
> In case of error, the function xenbus_read() returns ERR_PTR() and never
> returns NULL. The NULL test in the return value check should be replaced
> with IS_ERR().
> 
> Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>

Reviewed-by: Stefano Stabellini <sstabellini@...nel.org>

Thank you!

> ---
>  net/9p/trans_xen.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
> index 71e8564..83fe487 100644
> --- a/net/9p/trans_xen.c
> +++ b/net/9p/trans_xen.c
> @@ -454,8 +454,8 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
>  			goto error_xenbus;
>  	}
>  	priv->tag = xenbus_read(xbt, dev->nodename, "tag", NULL);
> -	if (!priv->tag) {
> -		ret = -EINVAL;
> +	if (IS_ERR(priv->tag)) {
> +		ret = PTR_ERR(priv->tag);
>  		goto error_xenbus;
>  	}
>  	ret = xenbus_transaction_end(xbt, 0);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ