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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161031181849.GA11486@bhelgaas-glaptop.roam.corp.google.com>
Date:   Mon, 31 Oct 2016 13:18:49 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, xen-devel@...ts.xen.org,
        david.vrabel@...rix.com, boris.ostrovsky@...cle.com,
        bhelgaas@...gle.com, linux-pci@...r.kernel.org
Subject: Re: [PATCH 08/12] xen: make use of xenbus_read_unsigned() in
 xen-pcifront

On Mon, Oct 31, 2016 at 05:48:26PM +0100, Juergen Gross wrote:
> Use xenbus_read_unsigned() instead of xenbus_scanf() when possible.
> This requires to change the type of the read from int to unsigned,
> but this case has been wrong before: negative values are not allowed
> for the modified case.
> 
> Cc: bhelgaas@...gle.com
> Cc: linux-pci@...r.kernel.org
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>

Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>

I assume this will be merged with the rest of the series via some tree
other than mine.

> ---
>  drivers/pci/xen-pcifront.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
> index d6ff5e8..8fc2e95 100644
> --- a/drivers/pci/xen-pcifront.c
> +++ b/drivers/pci/xen-pcifront.c
> @@ -1038,10 +1038,8 @@ static int pcifront_detach_devices(struct pcifront_device *pdev)
>  			err = -ENOMEM;
>  			goto out;
>  		}
> -		err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str, "%d",
> -				   &state);
> -		if (err != 1)
> -			state = XenbusStateUnknown;
> +		state = xenbus_read_unsigned(pdev->xdev->otherend, str,
> +					     XenbusStateUnknown);
>  
>  		if (state != XenbusStateClosing)
>  			continue;
> -- 
> 2.6.6
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ