On Thu, Dec 14, 2017 at 3:27 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > > The LDT is inheritet independent of fork or exec, but that makes no sense > at all because exec is supposed to start the process clean. > > The reason why this happens is that init_new_context_ldt() is called from > init_new_context() which obviously needs to be called for both fork() and > exec(). > > It would be surprising if anything relies on that behaviour, so it seems to > be safe to remove that misfeature. > > Split the context initialization into two parts. Clear the ldt pointer and > initialize the mutex from the general context init and move the LDT > duplication to arch_dup_mmap() which is only called on fork(). I like this one. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>