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

From: James Morris
Date: Wed Aug 20 2008 - 18:37:37 EST


On Wed, 20 Aug 2008, David Howells wrote:

> Further fix [compat_]do_execve() error handling. free_bprm() will release the
> cred_exec_mutex, but only if bprm->cred is not NULL.

This seems quite ugly and error-prone, with a mutex_unlock() being called
from a helper function rather than the body of the function which locked
it.

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


- James
--
James Morris
<jmorris@xxxxxxxxx>
--
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/