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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Oct 2011 00:07:30 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Fenghua Yu <fenghua.yu@...el.com>
CC:	Ingo Molnar <mingo@...e.hu>, srivatsa.bhat@...ux.vnet.ibm.com,
	Thomas Gleixner <tglx@...utronix.de>,
	H Peter Anvin <hpa@...or.com>,
	Zwane Mwaikambo <zwane@....linux.org.uk>,
	Tony Luck <tony.luck@...el.com>,
	Asit K Mallick <asit.k.mallick@...el.com>,
	Suresh B Siddha <suresh.b.siddha@...el.com>,
	Len Brown <lenb@...nel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/8] kernel/power/main.c: Not suspend/resume if CPU0 is
 offlined

Hi,

On 10/05/2011 10:09 PM, Fenghua Yu wrote:
> 
> @@ -178,6 +179,14 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
>  	int len;
>  	int error = -EINVAL;
> 
> +#ifdef CONFIG_HOTPLUG_CPU
> +	if (bsp_hotpluggable && cpumask_first(cpu_online_mask) != 0) {
> +		printk(KERN_WARNING "Because CPU0 is offlined, system can't suspend/resume.\n");
> +
> +		return -ENODEV;
> +	}
> +#endif

There is a possible race condition here. What if CPU0 gets offlined
AFTER this point(due to a CPU hotplug operation)?
We will probably have to prevent CPU0 from being taken offline from
this point onwards, and remove that restriction later on.

> +
>  	p = memchr(buf, '\n', n);
>  	len = p ? p - buf : n;
> 


-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@...ux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab
--
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