mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: David Howells <[email protected]> Acked-by: Roland McGrath <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
82e3310ace
commit
793285fcaf
3 changed files with 6 additions and 6 deletions
|
|
@ -1486,8 +1486,8 @@ int compat_do_execve(char * filename,
|
|||
if (!bprm)
|
||||
goto out_files;
|
||||
|
||||
retval = mutex_lock_interruptible(¤t->cred_guard_mutex);
|
||||
if (retval < 0)
|
||||
retval = -ERESTARTNOINTR;
|
||||
if (mutex_lock_interruptible(¤t->cred_guard_mutex))
|
||||
goto out_free;
|
||||
current->in_execve = 1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue