Re: [BUGFIX][PATCH] fix is_mem_section_removable() page_order BUG_ON check.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 25, 2010 at 02:37:26PM +0800, KAMEZAWA Hiroyuki wrote:
> I wonder this should be for stable tree...but want to hear opinions before.
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> 
> 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().

One more alternative might be to introduce a private
maybe_page_order() for is_mem_section_removable(). Not a big deal. 
 
> 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().

Acked-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]