From: Gerald Schaefer Date: Thu, 6 Nov 2008 20:53:36 +0000 (-0800) Subject: memory hotplug: fix page_zone() calculation in test_pages_isolated() X-Git-Tag: v2.6.27.7~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fd7e3ce7ec2dcf13a2fa592ee48dd528ba9c561;p=pandora-kernel.git memory hotplug: fix page_zone() calculation in test_pages_isolated() commit a70dcb969f64e2fa98c24f47854f20bf02ff0092 upstream. My last bugfix here (adding zone->lock) introduced a new problem: Using page_zone(pfn_to_page(pfn)) to get the zone after the for() loop is wrong. pfn will then be >= end_pfn, which may be in a different zone or not present at all. This may lead to an addressing exception in page_zone() or spin_lock_irqsave(). Now I use __first_valid_page() again after the loop to find a valid page for page_zone(). Signed-off-by: Gerald Schaefer Acked-by: Nathan Fontenot Reviewed-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed