Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 07:19 AM, Andrew Morton wrote: ... + entry = firmware_map_find_entry(start, end - 1, type); + if (!entry) + return -EINVAL; + + firmware_map_remove_entry(entry); ... The above code looks racy. After firmware_map_find_entry() does the

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 06:49 AM, Andrew Morton wrote: On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chen wrote: When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch implements the function to r

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chen wrote: > From: Yasuaki Ishimatsu > > When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} > sysfs files are created. But there is no code to remove these files. The patch > implements the function to remove them. > > Note: T

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chen wrote: > When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} > sysfs files are created. But there is no code to remove these files. The patch > implements the function to remove them. > > Note: The code does not free firmware