Re: [PATCH] Fix sigaltstack corruption among cloned threads

From: Ulrich Drepper
Date: Mon Mar 13 2006 - 10:13:37 EST


On 3/13/06, GOTO Masanori <gotom@xxxxxxxxxx> wrote:
> + * sigaltstack should be cleared when CLONE_SIGHAND (and CLONE_VM) is
> + * specified.
> + */
> + if (clone_flags & CLONE_SIGHAND)
> + p->sas_ss_sp = p->sas_ss_size = 0;

I agree in general, but why base it on CLONE_SIGHAND? The problem
results from using the same address space. So it should be

if (clone_flags & CLONE_VM)

The fact that both these flags are used at the same time in all cases
today shouldn't hide the real reason for this requirement which is
sharing the address space.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/