Files
linux/mm
KAMEZAWA Hiroyuki e36e20486e mm: fix is_mem_section_removable() page_order BUG_ON check
commit 572438f9b5 upstream.

page_order() is called by memory hotplug's user interface to check the
section is removable or not.  (is_mem_section_removable())

It calls page_order() withoug holding zone->lock.
So, even if the caller does

	if (PageBuddy(page))
		ret = page_order(page) ...
The caller may hit BUG_ON().

For fixing this, there are 2 choices.
  1. add zone->lock.
  2. remove BUG_ON().

is_mem_section_removable() is used for some "advice" and doesn't need to
be 100% accurate.  This is_removable() can be called via user program..
We don't want to take this important lock for long by user's request.  So,
this patch removes BUG_ON().

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 13:26:40 -08:00
..
2009-04-01 08:59:13 -07:00
2010-07-05 11:10:42 -07:00
2009-06-16 19:47:28 -07:00
2010-01-06 15:05:22 -08:00
2010-05-12 14:57:00 -07:00
2010-12-09 13:26:39 -08:00
2009-09-22 07:17:35 -07:00
2010-10-28 21:44:18 -07:00
2010-09-26 17:21:34 -07:00
2010-01-18 10:19:11 -08:00
2010-08-26 16:41:44 -07:00
2010-09-26 17:21:27 -07:00
2009-10-01 16:11:12 -07:00
2010-08-26 16:41:46 -07:00
2009-06-23 12:50:05 -07:00
2010-01-22 15:18:41 -08:00
2010-01-18 10:19:11 -08:00