Messages in this thread Patch in this message | | | Subject | PATCH: Stop the tty vanishing under procfs access | From | Alan Cox <> | Date | Wed, 16 Aug 2006 17:33:03 +0100 |
| |
Would appreciate people double checking this one.
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc4-mm1/fs/proc/array.c linux-2.6.18-rc4-mm1/fs/proc/array.c --- linux.vanilla-2.6.18-rc4-mm1/fs/proc/array.c 2006-08-15 15:39:31.000000000 +0100 +++ linux-2.6.18-rc4-mm1/fs/proc/array.c 2006-08-15 16:02:56.000000000 +0100 @@ -347,6 +347,8 @@ sigemptyset(&sigign); sigemptyset(&sigcatch); cutime = cstime = utime = stime = cputime_zero; + + mutex_lock(&tty_mutex); read_lock(&tasklist_lock); if (task->sighand) { spin_lock_irq(&task->sighand->siglock); @@ -388,6 +390,7 @@ } ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; read_unlock(&tasklist_lock); + mutex_unlock(&tty_mutex); if (!whole || num_threads<2) wchan = get_wchan(task); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |