lkml.org 
[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: what is the state of current after an mm_fault occurs?
Christoph Lameter <clameter@engr.sgi.com> wrote:
>
> On Wed, 4 Jan 2006, Andrew Morton wrote:
>
> > > You mean in some pagefault place we do schedule()?
> >
> > We used to - that should no longer be the case. The TASK_RUNNING thing is
> > probably redundant now.
>
> The page fault handler calls the page allocator in various places
> which may sleep.

That's OK - they should all do set_current_state() before sleeping. It's
the bare schedule() without previously setting TASK_foo which is the
problem. We used to do that sort of thing in 2.4 as a lame yield point but
we really shouldn't be doing that at all anywhere any more.

> current may not point to the current process if the page fault handler was
> called from get_user_pages.

current always points at the current process. In the situation
ptrace->access_process_vm->get_user_pages->pagefault we'll have mm !=
current->mm.
-
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: 2006-01-06 00:21    [W:0.052 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site