lkml.org 
[lkml]   [2007]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 29 Jun 2007 01:22:43 -0400
FromKyle McMartin <>
SubjectRe: is this a bug of elf_core_dump
On Fri, Jun 29, 2007 at 01:03:06PM +0800, ye janboe wrote:
> 			if (get_user_pages(current, current->mm, addr, 1, 0, 
> 			1,
> 						&page, &vma) <= 0) {
> 				DUMP_SEEK(PAGE_SIZE);
> 			} else {
> 
> 
> does get_user_pages directly use page variable which is not
> initialized is a bug?
> 

Why not look at mm/memory.c::get_user_pages and look at how it uses the
**pages argument? The fact that it is passing in the address of a
pointer to a struct page, along with the function name should be a big
hint as to what it is doing...

<spoiler>
more or less it is looking up the struct page pointer for the user address
passed in and returning it to the calling function via &page...
</spoiler>

Chees,
	Kyle M
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-29 05:38    [from the cache]
©2003-2008