Re: [PATCH] kexec, kernel 2.6.26.5, segmentation fault in kimage_add_entry

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Tuesday, September 16, 2008 - 7:40 pm

Simon Horman <horms@verge.net.au> writes:


No.  kimage_alloc_pages() is a light wrapper around alloc_pages that simply
marks the pages as reserved so they don't get used for other things while
we have a hold of them.

kimage_alloc_page() does a check to see if the page we have just allocated
is the a page we are going to copy to and if so it does the copy of the
data now, and frees the page that was holding the data.

As an optimization it returns the page holding the data.  The problem is that
we allocate control pages as GFP_KERNEL and data pages GFP_HIGHUSER.  And so
they are not completely interchangeable.

Since this check and swap only happens inside of kimage_alloc_page it only affects
kimage_alloc_page.

Eric
n
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] kexec: segmentation fault in kimage_add_entry, Eric W. Biederman, (Tue Sep 16, 3:21 pm)
Re: [PATCH] kexec, kernel 2.6.26.5, segmentation fault in ..., Eric W. Biederman, (Tue Sep 16, 7:40 pm)