Skip to contentSkip to conversation

UML - tty locking

PATCH New Alan Cox 1 participant 1 message Sep 11, 2006 User-mode Linux (UML)

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 UML - tty locking

Jeff this is the tty locking diff I mentioned at Linux Kongress, it just ensures current->signal->tty doesn't get freed during log_exec().

arch/um/kernel/exec.c +3 -1
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc6-mm1/arch/um/kernel/exec.c linux-2.6.18-rc6-mm1/arch/um/kernel/exec.c
@@ -41,9 +41,11 @@
         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){

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel