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: <4F0AE507.8020200@linux.vnet.ibm.com>
Date:	Mon, 09 Jan 2012 18:30:55 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	Len Brown <len.brown@...el.com>,
	Kay Sievers <kay.sievers@...y.org>,
	Kevin Hilman <khilman@...com>,
	Trinabh Gupta <g.trinabh@...il.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Deepthi Dharwar <deepthi@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Linux PM mailing list <linux-pm@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()

On 01/09/2012 04:24 PM, Dan Carpenter wrote:

> We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
> sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
> here not "dev".  The "dev" variable was dereferenced already.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 59f4261..7771810 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
>  	struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
>  	struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
> 
> -	if (!dev)
> +	if (!cpu_dev)
>  		return -EINVAL;
>  	if (!try_module_get(cpuidle_driver->owner))
>  		return -EINVAL;


Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>

--
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