Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / arch / um / kernel / exec.c
index fc38a6d5906d4251599a95753f229486eae2cb4e..356e50f5aaed4c6567e8780adbba06f80494e2a2 100644 (file)
@@ -10,8 +10,8 @@
 #include "asm/pgtable.h"
 #include "asm/tlbflush.h"
 #include "asm/uaccess.h"
-#include "user_util.h"
 #include "kern_util.h"
+#include "as-layout.h"
 #include "mem_user.h"
 #include "kern.h"
 #include "irq_user.h"
@@ -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){