Revision f9092f358bc2ec5367621478811f046f82873376 authored by Jonathan Steel on 22 September 2008, 20:57:45 UTC, committed by Linus Torvalds on 23 September 2008, 15:09:14 UTC
A segmentation fault can occur in kimage_add_entry in kexec.c when loading
a kernel image into memory.  The fault occurs because a page is requested
by calling kimage_alloc_page with gfp_mask GFP_KERNEL and the function may
actually return a page with gfp_mask GFP_HIGHUSER.  The high mem page is
returned because it was swapped with the kernel page due to the kernel
page being a page that will shortly be copied to.

This patch ensures that kimage_alloc_page returns a page that was created
with the correct gfp flags.

I have verified the change and fixed the whitespace damage of the original
patch.  Jonathan did a great job of tracking this down after he hit the
problem.  -- Eric

Signed-off-by: Jonathan Steel <jon.steel@esentire.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 39f00c0
History
File Mode Size
cpia2
dabusb
dsp56k
edgeport
emi26
emi62
ess
kaweth
keyspan
keyspan_pda
korg
sb16
ttusb-budget
vicam
yamaha
.gitignore -rw-r--r-- 39 bytes
Makefile -rw-r--r-- 8.6 KB
WHENCE -rw-r--r-- 9.8 KB
atmsar11.HEX -rw-r--r-- 18.7 KB
ihex2fw.c -rw-r--r-- 6.2 KB
intelliport2.bin.ihex -rw-r--r-- 92.2 KB
ti_3410.fw.ihex -rw-r--r-- 37.0 KB
ti_5052.fw.ihex -rw-r--r-- 37.0 KB
tr_smctr.bin.ihex -rw-r--r-- 20.5 KB
whiteheat.HEX -rw-r--r-- 43.9 KB
whiteheat_loader.HEX -rw-r--r-- 11.8 KB
whiteheat_loader_debug.HEX -rw-r--r-- 17.2 KB

back to top