aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-07-05 15:08:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-06 16:57:04 -0400
commit793285fcafce4719a05e0c99fa74b188157fe7fe (patch)
tree3395530c1d4e604beac506c703b3093bb13f23ee /fs/compat.c
parent82e3310ace59794ecf0f531eca94647b2863dfda (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/compat.c')
-rw-r--r--fs/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/compat.c b/fs/compat.c
index cdd51a3a7c5..fbadb947727 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1486,8 +1486,8 @@ int compat_do_execve(char * filename,
1486 if (!bprm) 1486 if (!bprm)
1487 goto out_files; 1487 goto out_files;
1488 1488
1489 retval = mutex_lock_interruptible(&current->cred_guard_mutex); 1489 retval = -ERESTARTNOINTR;
1490 if (retval < 0) 1490 if (mutex_lock_interruptible(&current->cred_guard_mutex))
1491 goto out_free; 1491 goto out_free;
1492 current->in_execve = 1; 1492 current->in_execve = 1;
1493 1493