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
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 2.9 KB |
Kconfig.iosched | -rw-r--r-- | 1.9 KB |
Makefile | -rw-r--r-- | 599 bytes |
as-iosched.c | -rw-r--r-- | 38.5 KB |
blk-barrier.c | -rw-r--r-- | 7.6 KB |
blk-core.c | -rw-r--r-- | 54.0 KB |
blk-exec.c | -rw-r--r-- | 2.6 KB |
blk-integrity.c | -rw-r--r-- | 9.9 KB |
blk-ioc.c | -rw-r--r-- | 4.0 KB |
blk-map.c | -rw-r--r-- | 7.3 KB |
blk-merge.c | -rw-r--r-- | 12.3 KB |
blk-settings.c | -rw-r--r-- | 13.6 KB |
blk-sysfs.c | -rw-r--r-- | 8.3 KB |
blk-tag.c | -rw-r--r-- | 9.6 KB |
blk.h | -rw-r--r-- | 1.9 KB |
blktrace.c | -rw-r--r-- | 12.6 KB |
bsg.c | -rw-r--r-- | 23.0 KB |
cfq-iosched.c | -rw-r--r-- | 56.6 KB |
cmd-filter.c | -rw-r--r-- | 5.5 KB |
compat_ioctl.c | -rw-r--r-- | 21.9 KB |
deadline-iosched.c | -rw-r--r-- | 11.5 KB |
elevator.c | -rw-r--r-- | 26.3 KB |
genhd.c | -rw-r--r-- | 19.5 KB |
ioctl.c | -rw-r--r-- | 7.0 KB |
noop-iosched.c | -rw-r--r-- | 2.6 KB |
scsi_ioctl.c | -rw-r--r-- | 17.1 KB |
Computing file changes ...