Re: [PATCH] CRED: Further fix execve error handling

From: David Howells
Date: Thu Aug 21 2008 - 08:43:42 EST


James Morris <jmorris@xxxxxxxxx> wrote:

> How about moving the mutex_unlock() out of free_bprm() and into the
> calling code ?

Okay, I've sent you a patch to do this. Note that it only affects the error
handling case. In the case of a successful execution, install_exec_creds()
will release the mutex when it is safe to do so. This then permits
PTRACE_ATTACH to take place from that point. I could shift the unlock so that
it always happens in [compat_]do_execve() - do you think it's worth it? It
would mean that ptrace wouldn't be able to attach to a process that's still
under construction by the binfmt, which is probably reasonable.

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