lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PATCH: Lock tty directly in acct layer
From
Date
On Wed, 2006-08-16 at 17:36 +0100, Alan Cox wrote:
> 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/kernel/acct.c linux-2.6.18-rc4-mm1/kernel/acct.c
> --- linux.vanilla-2.6.18-rc4-mm1/kernel/acct.c 2006-08-15 15:40:19.000000000 +0100
> +++ linux-2.6.18-rc4-mm1/kernel/acct.c 2006-08-15 16:03:18.000000000 +0100
> @@ -483,10 +484,10 @@
> ac.ac_ppid = current->parent->tgid;
> #endif
>
> - read_lock(&tasklist_lock); /* pin current->signal */
> + mutex_lock(&tty_mutex);
> ac.ac_tty = current->signal->tty ?

but.. can't ->signal still change, even if signal->tty isn't ?



--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com

-
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/

\
 
 \ /
  Last update: 2006-08-16 18:27    [W:0.057 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site