Merge git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-drm-fsl-dcu.git] / arch / um / kernel / exec.c
index fc38a6d5906d4251599a95753f229486eae2cb4e..121166400e25a01917df9452560e2fc12bfba882 100644 (file)
@@ -39,11 +39,14 @@ static long execve1(char *file, char __user * __user *argv,
                    char __user *__user *env)
 {
         long error;
-
 #ifdef CONFIG_TTY_LOG
-       task_lock(current);
-       log_exec(argv, current->signal->tty);
-       task_unlock(current);
+       struct tty_struct *tty;
+
+       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){