All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [patch 2/2] hrtimer
Date: Tue, 28 Mar 2006 03:55:30 +0400	[thread overview]
Message-ID: <20060327235530.GA7024@oleg> (raw)
In-Reply-To: <1143411016.5344.139.camel@localhost.localdomain>

I also think this is racy.

CPU_0					CPU_1

hrtimer_wakeup:

	task = t->task;
	t->task = NULL;

	<--- INTERRUPT --->

					task is woken by signal,
					do_nanosleep() sees t->task == NULL,
					returns without hrtimer_cancel(),
					and __exits__.

	<--- RESUME --->

	wake_up_process(task);

Instead of exit(), 'task' can go to TASK_STOPPED or TASK_UNINTERRUPTIBLE
after return from do_nanosleep(), it will be awakened by hrtimer_wakeup()
unexpectedly.

Oleg.


  reply	other threads:[~2006-03-27 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-25 12:46 [patch 0/2] hrtimer: generic sleeper infrastructure Thomas Gleixner
2006-03-25 12:46 ` [patch 1/2] hrtimer Thomas Gleixner
2006-03-25 12:46 ` [patch 2/2] hrtimer Thomas Gleixner
2006-03-26  2:32   ` Andrew Morton
2006-03-26 22:10     ` Thomas Gleixner
2006-03-27 23:55       ` Oleg Nesterov [this message]
2006-03-28  0:03         ` Roman Zippel
2006-03-28  8:29         ` Thomas Gleixner

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=20060327235530.GA7024@oleg \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.