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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1244790598.6691.956.camel@laptop>
Date:	Fri, 12 Jun 2009 09:09:58 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Stanislaw Gruszka <sgruszka@...hat.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Oleg Nesterov <oleg@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] posix-cpu-timers: avoid do_sys_times() races with
 __exit_signal()

On Fri, 2009-06-12 at 08:49 +0200, Stanislaw Gruszka wrote:
> Protect thread_group_cputime() call by siglock, to avoid possible (but
> to be honest - very improbable) double times accounting of exiting task.
> This is revert of commit 2b5fe6de58276d0b5a7c884d5dbfc300ca47db78
> "thread_group_cputime: move a couple of callsites outside of ->siglock",
> but implementation of thread_group_cputime() was different then.

Would be nice to have a description of exactly how you'd end up
accounting twice (and thus how this patch fixes it).

> Signed-off-by: Stanislaw Gruszka <sgruszka@...hat.com>
> ---
>  kernel/sys.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/sys.c b/kernel/sys.c
> index e7998cf..0805d08 100644
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -913,8 +913,8 @@ void do_sys_times(struct tms *tms)
>  	struct task_cputime cputime;
>  	cputime_t cutime, cstime;
>  
> -	thread_group_cputime(current, &cputime);
>  	spin_lock_irq(&current->sighand->siglock);
> +	thread_group_cputime(current, &cputime);
>  	cutime = current->signal->cutime;
>  	cstime = current->signal->cstime;
>  	spin_unlock_irq(&current->sighand->siglock);

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