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]
Message-ID: <50A1AAC5.8000506@cn.fujitsu.com>
Date:	Tue, 13 Nov 2012 10:04:53 +0800
From:	Wen Congyang <wency@...fujitsu.com>
To:	Toshi Kani <toshi.kani@...com>
CC:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-acpi@...r.kernel.org, Len Brown <len.brown@...el.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Mel Gorman <mgorman@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Jiang Liu <liuj97@...il.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Christoph Lameter <cl@...ux.com>
Subject: Re: [Patch v4 1/7] acpi,memory-hotplug: introduce a mutex lock to
 protect the list in acpi_memory_device

At 11/13/2012 05:00 AM, Toshi Kani Wrote:
> On Thu, 2012-11-08 at 19:04 +0800, Wen Congyang wrote:
>> The memory device can be removed by 2 ways:
>> 1. send eject request by SCI
>> 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject
>>
>> This 2 events may happen at the same time, so we may touch
>> acpi_memory_device.res_list at the same time. This patch
>> introduce a lock to protect this list.
> 
> Hi Wen,
> 
> This race condition is not unique in memory hot-remove as the sysfs
> eject interface is created for all objects with _EJ0.  For CPU
> hot-remove, I addressed this race condition by making the notify handler
> to run the hot-remove operation on kacpi_hotplug_wq by calling
> acpi_os_hotplug_execute().  This serializes the hot-remove operations
> among the two events since the sysfs eject also runs on
> kacpi_hotplug_wq.  This way is much simpler and is easy to maintain,
> although it does not allow both operations to run simultaneously (which
> I do not think we need).  Can it be used for memory hot-remove as well?

Good idea. I will update it.

Thanks
Wen Congyang

> 
> Thanks,
> -Toshi
> 
> --
> 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/
> 

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