Commit b1fc0b1f authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] UML: tty locking

Ensure current->signal->tty doesn't get freed during log_exec().
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Acked-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 75e29b18
...@@ -41,9 +41,11 @@ static long execve1(char *file, char __user * __user *argv, ...@@ -41,9 +41,11 @@ static long execve1(char *file, char __user * __user *argv,
long error; long error;
#ifdef CONFIG_TTY_LOG #ifdef CONFIG_TTY_LOG
task_lock(current); mutex_lock(&tty_mutex);
task_lock(current); /* FIXME: is this needed ? */
log_exec(argv, current->signal->tty); log_exec(argv, current->signal->tty);
task_unlock(current); task_unlock(current);
mutex_unlock(&tty_mutex);
#endif #endif
error = do_execve(file, argv, env, &current->thread.regs); error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0){ if (error == 0){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment