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:	Mon, 11 May 2015 09:57:47 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Hanjun Guo <hanjun.guo@...aro.org>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	linux-acpi@...r.kernel.org, Will Deacon <will.deacon@....com>,
	Catalin Marinas <catalin.marinas@....com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Sudeep Holla <Sudeep.Holla@....com>,
	linux-kernel@...r.kernel.org, linaro-acpi@...ts.linaro.org
Subject: Re: [PATCH v3 2/7] Xen / ACPI / processor: use
 invalid_logical_cpuid()

On Mon, May 11, 2015 at 12:17:14PM +0800, Hanjun Guo wrote:
> Use invalid_logical_cpuid(pr->id) instead of direct comparison.
> 
> Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org>
> CC: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> CC: Stefano Stabellini <stefano.stabellini@...citrix.com>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
>  drivers/xen/xen-acpi-cpuhotplug.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/xen/xen-acpi-cpuhotplug.c b/drivers/xen/xen-acpi-cpuhotplug.c
> index 3e62ee4..5a62aa0 100644
> --- a/drivers/xen/xen-acpi-cpuhotplug.c
> +++ b/drivers/xen/xen-acpi-cpuhotplug.c
> @@ -77,7 +77,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
>  
>  	pr->id = xen_pcpu_id(pr->acpi_id);
>  
> -	if ((int)pr->id < 0)
> +	if (invalid_logical_cpuid(pr->id))
>  		/* This cpu is not presented at hypervisor, try to hotadd it */
>  		if (ACPI_FAILURE(xen_acpi_cpu_hotadd(pr))) {
>  			pr_err(PREFIX "Hotadd CPU (acpi_id = %d) failed.\n",
> @@ -226,7 +226,7 @@ static acpi_status xen_acpi_cpu_hotadd(struct acpi_processor *pr)
>  		return AE_ERROR;
>  
>  	pr->id = xen_hotadd_cpu(pr);
> -	if ((int)pr->id < 0)
> +	if (invalid_logical_cpuid(pr->id))
>  		return AE_ERROR;
>  
>  	/*
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ