Rafael J. Wysocki c5d712433f Fix __pfn_to_page(pfn) for CONFIG_DISCONTIGMEM=y
Fix the __pfn_to_page(pfn) macro so that it doesn't evaluate its
argument twice in the CONFIG_DISCONTIGMEM=y case, because 'pfn' may
be a result of a funtion call having side effects.

For example, the hibernation code applies pfn_to_page(pfn) to the
result of a function returning the pfn corresponding to the next set
bit in a bitmap and the current bit position is modified on each
call.  This leads to "interesting" failures for CONFIG_DISCONTIGMEM=y
due to the current behavior of __pfn_to_page(pfn).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-08 10:02:48 -08:00
..
2008-07-04 10:40:04 -07:00
2008-10-20 15:29:57 -07:00
2008-02-06 10:41:00 -08:00
2008-05-01 08:03:58 -07:00
2005-04-16 15:20:36 -07:00
2007-07-16 09:05:45 -07:00
2008-10-16 11:21:40 -07:00
2005-04-16 15:20:36 -07:00
2008-08-12 16:07:31 -07:00
2008-05-02 16:18:19 -07:00
2005-09-08 14:57:25 -07:00
2008-07-15 13:58:40 -07:00
2007-05-11 08:29:34 -07:00
2008-10-20 08:52:41 -07:00
2008-09-05 14:39:38 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00