Hibernation: do not try to mark invalid PFNs as nosave
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 10 Aug 2007 20:00:57 +0000 (13:00 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 11 Aug 2007 22:47:40 +0000 (15:47 -0700)
commitc5a69adff920ddf138c3ea9886574b195d9e3d52
tree446b3776c9f4ba3df5c22880adfc3395400fa220
parenta75de1b3799f8933d6d2b64bdf31194368ec98ab
Hibernation: do not try to mark invalid PFNs as nosave

On some systems some PFNs reported by the early initialization code as
'nosave' may be invalid.  If we try to set the corresponding bits in the
hibernation bitmap, BUG_ON() in memory_bm_find_bit() will be triggered and
the system won't be able to boot (cf.
https://bugzilla.novell.com/show_bug.cgi?id=296242).

Prevent this from happening by verifying if the 'nosave' PFNs are valid in
mark_nosave_pages().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/snapshot.c