Re: PATCH? fix unshare(NEWPID) && vfork()

From: Oleg Nesterov
Date: Mon Aug 19 2013 - 13:57:15 EST


On 08/19, Linus Torvalds wrote:
>
> So I think your patch is correct, although I'm not sure why you move
> the test.

I didn't really, we have 2 tests, in do_fork() and copy_process().
I think it would be better to do the similar checks in one place.

This is off-topic and needs a separate change anyway, but perhaps
we should add the new helper which checks clone_flags. copy_process()
is huge.

> The new test you have look complicated as hell, so I think
> you're actually making things worse by making them unreadable.

Oh I agree. I'll wait for the comments on intent, then try to
cleanup it somehow. Unless a better fix comes.

Oleg.

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