]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/um/kernel/exec.c
[PATCH] tty: ->signal->tty locking
[net-next-2.6.git] / arch / um / kernel / exec.c
index 0561c43b4685c7935f4fb33600229a7c15793bf1..8d56ec6cca79606e8ee8d075e455e1f2b8d532d6 100644 (file)
@@ -39,12 +39,13 @@ static long execve1(char *file, char __user * __user *argv,
                    char __user *__user *env)
 {
         long error;
+       struct tty_struct *tty;
 
 #ifdef CONFIG_TTY_LOG
        mutex_lock(&tty_mutex);
-       task_lock(current);     /* FIXME:  is this needed ? */
-       log_exec(argv, current->signal->tty);
-       task_unlock(current);
+       tty = get_current_tty();
+       if (tty)
+               log_exec(argv, tty);
        mutex_unlock(&tty_mutex);
 #endif
         error = do_execve(file, argv, env, &current->thread.regs);