]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
Hibernation: Fix mark_nosave_pages()
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 11 Mar 2008 23:34:57 +0000 (00:34 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Mar 2008 03:15:55 +0000 (23:15 -0400)
commita82f7119fd940c1505fc9fdf93d835fa52bc075d
treee8fc2aaa6dc73da9dc2626aa6d239bdcf8c9d44d
parentbaadac8b10c5ac15ce3d26b68fa266c8889b163f
Hibernation: Fix mark_nosave_pages()

There is a problem in the hibernation code that triggers on some NUMA
systems on which pfn_valid() returns 'true' for some PFNs that don't
belong to any zone.  Namely, there is a BUG_ON() in
memory_bm_find_bit() that triggers for PFNs not belonging to any
zone and passing the pfn_valid() test.  On the affected systems it
triggers when we mark PFNs reported by the platform as not saveable,
because the PFNs in question belong to a region mapped directly using
iorepam() (i.e. the ACPI data area) and they pass the pfn_valid()
test.

Modify memory_bm_find_bit() so that it returns an error if given PFN
doesn't belong to any zone instead of crashing the kernel and ignore
the result returned by it in mark_nosave_pages(), while marking the
"nosave" memory regions.

This doesn't affect the hibernation functionality, as we won't touch
the PFNs in question anyway.

http://bugzilla.kernel.org/show_bug.cgi?id=9966 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
kernel/power/snapshot.c