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:	Thu, 1 Sep 2011 12:39:05 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	David Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org
Subject: Re: process time < thread time?

On Thu, 1 Sep 2011, Peter Zijlstra wrote:

> On Thu, 2011-09-01 at 11:56 +0200, Thomas Gleixner wrote:
> > The untested patch below should cure this.
> > 
> 
> > diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
> > index 58f405b..42378cb 100644
> > --- a/kernel/posix-cpu-timers.c
> > +++ b/kernel/posix-cpu-timers.c
> > @@ -250,7 +250,7 @@ void thread_group_cputime(struct task_struct *tsk,
> > struct task_cputime *times)
> >         do {
> >                 times->utime = cputime_add(times->utime, t->utime);
> >                 times->stime = cputime_add(times->stime, t->stime);
> > -               times->sum_exec_runtime += t->se.sum_exec_runtime;
> > +               times->sum_exec_runtime += task_sched_runtime(t);
> >         } while_each_thread(tsk, t);
> >  out:
> >         rcu_read_unlock(); 
> 
> I think we just deadlocked:

That's why I said untested :)
 
> cpu_clock_sample_group()
>   CPUCLOCK_SCHED: thread_group_sched_runtime()
>     task_rq_lock()        <-.
>     thread_group_cputime()  |
>       task_sched_runtime()  |
>        task_rq_lock() ------'
> 
> 
> Also, having to take locks here is sad, but yeah if we want to cure this
> there's not much we can do about that.

Yeah :(
 
--
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