Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 27 Jul 2011 12:39:00 -0700 | Subject | Re: [PATCH 0/8] make vfork killable/restartable/traceable |
| |
On Wed, Jul 27, 2011 at 9:31 AM, Oleg Nesterov <oleg@redhat.com> wrote: > > CLONE_VFORK sleeps in TASK_INTERRUPTIBLE until the child exits/execs. > This is obviously not good, it is sooo simple to create the task which > doesn't react to SIGKILL/SIGSTOP.
Well, I don't know how bad that is. You just kill the child instead. That's how vfork has always worked, not just on Linux.
And quite frankly, I think your patches 1-3 are unbelievably ugly. If it was some simple and straightforward "use wait_for_completion_killable() instead", I wouldn't mind it. But I think you made a simple and clean sequence convoluted and annoying.
I *suspect* that the killable() thing could be done more nicely by moving the vfork_completion into the parent instead, and maybe the vfork cleanup could just use "complete(&task->parent->vfork_completion);" instead (so if the parent goes away, it completes some irrelevant init case instead).
So *if* this can be done while still having straightforward code, I think it might be worth doing. But patches 1-3 just make me go "not worth the ugliness, especially since it's not a real problem".
Linus
| |