Merge to Fedora kernel-2.6.18-1.2239_FC5 patched with stable patch-2.6.18.2-vs2.0...
[linux-2.6.git] / arch / um / kernel / exec.c
index fc38a6d..8d56ec6 100644 (file)
@@ -39,11 +39,14 @@ static long execve1(char *file, char __user * __user *argv,
                    char __user *__user *env)
 {
         long error;
+       struct tty_struct *tty;
 
 #ifdef CONFIG_TTY_LOG
-       task_lock(current);
-       log_exec(argv, current->signal->tty);
-       task_unlock(current);
+       mutex_lock(&tty_mutex);
+       tty = get_current_tty();
+       if (tty)
+               log_exec(argv, tty);
+       mutex_unlock(&tty_mutex);
 #endif
         error = do_execve(file, argv, env, &current->thread.regs);
         if (error == 0){