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]
Date:	Wed, 19 Oct 2011 21:41:52 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Greg KH <greg@...ah.com>
cc:	Dave Jones <davej@...hat.com>, Simon Kirby <sim@...tway.ca>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	stable@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Patch Upstream: cputimer: Cure lock inversion

On Wed, 19 Oct 2011, Greg KH wrote:

> On Wed, Oct 19, 2011 at 11:39:14AM -0400, Gregs git-bot wrote:
> > commit: bcd5cff7216f9b2de0a148cc355eac199dc6f1cf
> > From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Date: Mon, 17 Oct 2011 11:50:30 +0200
> > Subject: cputimer: Cure lock inversion
> > 
> > There's a lock inversion between the cputimer->lock and rq->lock;
> > notably the two callchains involved are:
> > 
> >  update_rlimit_cpu()
> >    sighand->siglock
> >    set_process_cpu_timer()
> >      cpu_timer_sample_group()
> >        thread_group_cputimer()
> >          cputimer->lock
> >          thread_group_cputime()
> >            task_sched_runtime()
> >              ->pi_lock
> >              rq->lock
> > 
> >  scheduler_tick()
> >    rq->lock
> >    task_tick_fair()
> >      update_curr()
> >        account_group_exec()
> >          cputimer->lock
> > 
> > Where the first one is enabling a CLOCK_PROCESS_CPUTIME_ID timer, and
> > the second one is keeping up-to-date.
> > 
> > This problem was introduced by e8abccb7193 ("posix-cpu-timers: Cure
> > SMP accounting oddities").
> 
> There is no such patch in Linus's tree that I can find.  So, what
> problem is this really trying to cure here and what kernel did it show
> up in?

Oops. It's in 3.0.7

commit 249cf808ba1a0d403fe7c476a74b66e2bc0a8e53
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Date:   Thu Sep 1 12:42:04 2011 +0200

    posix-cpu-timers: Cure SMP wobbles
    
    commit d670ec13178d0fd8680e6742a2bc6e04f28f87d8 upstream.

and that patch introduced the above deadlock, which is cured by:

commit bcd5cff7216f9b2de0a148cc355eac199dc6f1cf
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Date:   Mon Oct 17 11:50:30 2011 +0200

    cputimer: Cure lock inversion

Thanks,

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