lkml.org 
[lkml]   [2010]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] ksm: check for ERR_PTR from follow_page()
On Wed, Apr 21, 2010 at 10:58:07PM +0200, Andrea Arcangeli wrote:
> On Wed, Apr 21, 2010 at 10:53:05PM +0200, Johannes Weiner wrote:
> > + * Returns the mapped (struct page *), %NULL if no mapping exists, or
> > + * an error pointer if there is a mapping to something not represented
> > + * by a page descriptor (see also vm_normal_page()).
>
> where exactly in vm_normal_page? Note I already checked vm_normal_page
> before sending the prev email and I didn't immediately see. I search
> return and they all return NULL except the return pfn_to_page(pfn), so
> is pfn_to_page that returns -EFAULT (the implementations I checked
> don't but there are plenty that I didn't check...).

It's not vm_normal_page() that returns -EFAULT. It is follow_page()
that translates NULL from vm_normal_page() into -EFAULT.


\
 
 \ /
  Last update: 2010-04-21 23:13    [W:0.029 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site