lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1161683295.24143.12.camel@taijtu>
Date:	Tue, 24 Oct 2006 11:48:15 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...l.org>, Alan Cox <alan@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] do_acct_process: don't take tty_mutex

On Mon, 2006-10-23 at 17:56 +0400, Oleg Nesterov wrote:
> Depends on
> 	tty-signal-tty-locking.patch
> 
> No need to take the global tty_mutex, signal->tty->driver can't go away
> while we are holding ->siglock.
> 
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl

> --- rc2-mm2/kernel/acct.c~	2006-10-22 19:28:17.000000000 +0400
> +++ rc2-mm2/kernel/acct.c	2006-10-23 17:09:12.000000000 +0400
> @@ -484,12 +484,9 @@ static void do_acct_process(struct file 
>  	ac.ac_ppid = current->parent->tgid;
>  #endif
>  
> -	mutex_lock(&tty_mutex);
> -	tty = get_current_tty();
> -	ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0;
> -	mutex_unlock(&tty_mutex);
> -
>  	spin_lock_irq(&current->sighand->siglock);
> +	tty = current->signal->tty;
> +	ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0;
>  	ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime)));
>  	ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime)));
>  	ac.ac_flag = pacct->ac_flag;
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ