Skip to content

Commit

Permalink
[PATCH] UML: tty locking
Browse files Browse the repository at this point in the history
Ensure current->signal->tty doesn't get freed during log_exec().

Signed-off-by: Alan Cox <[email protected]>
Acked-by: Jeff Dike <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan-Cox authored and Linus Torvalds committed Sep 26, 2006
1 parent 75e29b1 commit b1fc0b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/um/kernel/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ static long execve1(char *file, char __user * __user *argv,
long error;

#ifdef CONFIG_TTY_LOG
task_lock(current);
mutex_lock(&tty_mutex);
task_lock(current); /* FIXME: is this needed ? */
log_exec(argv, current->signal->tty);
task_unlock(current);
mutex_unlock(&tty_mutex);
#endif
error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0){
Expand Down

0 comments on commit b1fc0b1

Please sign in to comment.