public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Chen Gang <gang.chen@asianux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH 1/3] posix-timers: Correctly get dying task time sample in posix_cpu_timer_schedule()
Date: Thu, 11 Apr 2013 17:26:59 +0200	[thread overview]
Message-ID: <20130411152656.GG15699@somewhere> (raw)
In-Reply-To: <5158CFDF.4060700@asianux.com>

On Mon, Apr 01, 2013 at 08:07:59AM +0800, Chen Gang wrote:
> On 2013年03月30日 21:15, Frederic Weisbecker wrote:
> > In order to arm the next timer to schedule, we take a sample of the
> > current process or thread cputime.
> > 
> > If the task is dying though, we don't arm anything but we
> > cache the remaining timer expiration delta for further reads.
> > 
> > Something similar is performed in posix_cpu_timer_get() but
> > here we forget to take the process wide cputime sample
> > before caching it.
> > 
> > As a result we are storing random stack content, leading
> > every further reads of that timer to return junk values.
> > 
> > Fix this by taking the appropriate sample in the case of
> > process wide timers.
> > 
> > Reported-by: Andrew Morton <akpm@linux-foundation.org>
> > Reported-by: Chen Gang <gang.chen@asianux.com>
> > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> > Cc: Stanislaw Gruszka <sgruszka@redhat.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Cc: Ingo Molnar <mingo@elte.hu>
> > Cc: Oleg Nesterov <oleg@redhat.com>
> > Cc: Chen Gang <gang.chen@asianux.com>
> > ---
> 
>   thank you for mark me as reported by, although I reported too late
> (Andrew Morton is the first reporter).

Bug reporters simply deserve to be credited, no sorting is required ;)

> 
>   next, I should continue to try to find another issues about kernel.

I encourage you to do so :)

Thanks.

  reply	other threads:[~2013-04-11 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30 13:15 [PATCH 0/3] posix_timers: A few expiry caching fixes Frederic Weisbecker
2013-03-30 13:15 ` [PATCH 1/3] posix-timers: Correctly get dying task time sample in posix_cpu_timer_schedule() Frederic Weisbecker
2013-04-01  0:07   ` Chen Gang
2013-04-11 15:26     ` Frederic Weisbecker [this message]
2013-04-11 15:33       ` Chen Gang
2013-03-30 13:15 ` [PATCH 2/3] posix_timers: Fix racy timer delta caching on task exit Frederic Weisbecker
2013-03-30 13:15 ` [PATCH 3/3] posix_timers: Remove dead task timer expiry caching Frederic Weisbecker
2013-04-08 23:55 ` [PATCH 0/3] posix_timers: A few expiry caching fixes Andrew Morton
2013-04-11 15:19   ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130411152656.GG15699@somewhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=gang.chen@asianux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=sgruszka@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox