#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"
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, ¤t->thread.regs);
if (error == 0){