Re: [patch] user-vm-unlock-2.5.31-A2

Jamie Lokier (lk@tantalophile.demon.co.uk)
Thu, 15 Aug 2002 05:03:43 +0100


Ingo Molnar wrote:
> and here's a merged CLONE_VM_RELEASE patch against the previous
> clone-detached patch. (the sched.h reorganization broke it.)

I wonder if it makes more sense for the release word to be a futex --
then various ways of actually waiting for the stack are available.

It would be nice if the stored word were the exit() code, too. This
would remove the need for zombie threads even when an exit status is
desired.

> + /*
> + * Does the userspace VM want any unlock on mm_release()?
> + */
> + if (clone_flags & CLONE_RELEASE_VM) {
> + childregs->esp -= sizeof(0UL);
> + p->user_vm_lock = (long *) esp;

Is this correct? I would have expected this, given that stacks are
pre-decrement, and given that the value of `esp' is typically just after
the end of an mmaped region:

+ childregs->esp -= sizeof(0UL);
+ p->user_vm_lock = (long *) childregs->esp;

-- Jamie
-
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/