lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks
On Wed, 12 May 2010 21:51:50 +0100
Mel Gorman <mel@csn.ul.ie> wrote:

> On Wed, May 12, 2010 at 12:54:27PM -0700, Andrew Morton wrote:
> > On Wed, 12 May 2010 09:23:44 +0900 (JST)
> > KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> >
> > > > diff --git a/fs/exec.c b/fs/exec.c
> > > > index 725d7ef..13f8e7f 100644
> > > > --- a/fs/exec.c
> > > > +++ b/fs/exec.c
> > > > @@ -242,9 +242,10 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
> > > > * use STACK_TOP because that can depend on attributes which aren't
> > > > * configured yet.
> > > > */
> > > > + BUG_ON(VM_STACK_FLAGS & VM_STACK_INCOMPLETE_SETUP);
> > >
> > > Can we use BUILD_BUG_ON()?
> >
> > That's vastly preferable - I made that change.
> >
>
> I will be surprised if it works. On x86, that is
>
> #define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
> #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
> #define VM_DATA_DEFAULT_FLAGS \
> (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
> VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
>
> so VM_STACK_FLAGS is depending on the value of current->personality
> which we don't know at build time.

argh. So ytf is it in ALL_CAPS?

Geeze, kids these days...


\
 
 \ /
  Last update: 2010-05-12 23:03    [W:0.073 / U:13.652 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site