summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/exec.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-26 08:33:08 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 17:49:09 +0200
commitb1fc0b1f21c4082d24d1f456a846b4fa7d16a70b (patch)
treea2568be1bfd435ffcc398357577e8556b34a6fb9 /arch/um/kernel/exec.c
parent[PATCH] uml: stack usage reduction (diff)
downloadlinux-b1fc0b1f21c4082d24d1f456a846b4fa7d16a70b.tar.xz
linux-b1fc0b1f21c4082d24d1f456a846b4fa7d16a70b.zip
[PATCH] UML: tty locking
Ensure current->signal->tty doesn't get freed during log_exec(). Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--arch/um/kernel/exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index fc38a6d5906d..0561c43b4685 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -41,9 +41,11 @@ static long execve1(char *file, char __user * __user *argv,
long error;
#ifdef CONFIG_TTY_LOG
- task_lock(current);
+ mutex_lock(&tty_mutex);
+ task_lock(current); /* FIXME: is this needed ? */
log_exec(argv, current->signal->tty);
task_unlock(current);
+ mutex_unlock(&tty_mutex);
#endif
error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0){