lkml.org 
[lkml]   [2002]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG][PATCH] 2.4.* mlockall(MCL_FUTURE) is broken -- child inherits VM_LOCKED
Bruce Blinn wrote:
>
> Andrew Morton wrote:
> >
> > Dave Anderson wrote:
> > >
> > > In 2.4.*, mlockall(MCL_FUTURE) is erroneously inherited by child processes
> > > across fork() and exec():
> >
> > The Linux manpage says that it is not inherited across either.
> >
> > However SUS says that it is not inherited across exec, and
> > doesn't mention fork() at all.
> > http://www.opengroup.org/onlinepubs/007908799/xsh/mlockall.html
> >
> > So... Shouldn't we be clearing it in the exec() path?
> >
>
> But, the SUS documentation for fork() says that it does not inherit the
> memory locks of the parent. It explicitly mentions mlockall().
>
> http://www.opengroup.org/onlinepubs/007908799/xsh/fork.html

So it does. So clearing it on fork is correct. And my comment
regarding def_flags was nonsense. Probably it's best to explicitly
clear VM_LOCKED, just in case something else gets added to def_flags
in the future.

Apart from that - ship it :)

-
-
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: 2005-03-22 13:15    [W:0.078 / U:29.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site