diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-07-05 15:08:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-06 16:57:04 -0400 |
commit | 793285fcafce4719a05e0c99fa74b188157fe7fe (patch) | |
tree | 3395530c1d4e604beac506c703b3093bb13f23ee /fs/exec.c | |
parent | 82e3310ace59794ecf0f531eca94647b2863dfda (diff) |
cred_guard_mutex: do not return -EINTR to user-space
do_execve() and ptrace_attach() return -EINTR if
mutex_lock_interruptible(->cred_guard_mutex) fails.
This is not right, change the code to return ERESTARTNOINTR.
Perhaps we should also change proc_pid_attr_write().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1277,8 +1277,8 @@ int do_execve(char * filename, | |||
1277 | if (!bprm) | 1277 | if (!bprm) |
1278 | goto out_files; | 1278 | goto out_files; |
1279 | 1279 | ||
1280 | retval = mutex_lock_interruptible(¤t->cred_guard_mutex); | 1280 | retval = -ERESTARTNOINTR; |
1281 | if (retval < 0) | 1281 | if (mutex_lock_interruptible(¤t->cred_guard_mutex)) |
1282 | goto out_free; | 1282 | goto out_free; |
1283 | current->in_execve = 1; | 1283 | current->in_execve = 1; |
1284 | 1284 | ||