Messages in this thread | | | Date | Tue, 08 Jan 2002 14:39:09 -0800 | From | Andrew Morton <> | Subject | Re: [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/
| |