[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1327400618.2614.13.camel@laptop>
Date: Tue, 24 Jan 2012 11:23:38 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: KOSAKI Motohiro <kosaki.motohiro@...il.com>
Cc: Oleg Nesterov <oleg@...hat.com>,
Yasunori Goto <y-goto@...fujitsu.com>,
Ingo Molnar <mingo@...e.hu>,
Hiroyuki KAMEZAWA <kamezawa.hiroyu@...fujitsu.com>,
Motohiro Kosaki <kosaki.motohiro@...fujitsu.com>,
Linux Kernel ML <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] TASK_DEAD task is able to be woken up in special
condition
On Wed, 2011-12-28 at 16:07 -0500, KOSAKI Motohiro wrote:
> I looked at scheduler code today briefly. now I'm afraid following code
> have similar race.
>
>
> if (task_contributes_to_load(p))
> rq->nr_uninterruptible--;
>
>
>
> Can't following schenario be happen?
>
>
> CPU0 CPU1
> --------------------------------------------------------
> deactivate_task()
> task->state = TASK_UNINTERRUPTIBLE;
> activate_task()
> rq->nr_uninterruptible--;
>
> schedule()
> deactivate_task()
> rq->nr_uninterruptible++;
>
> Totally, nr_uninterruptible wasn't incremented.
>
>
> I'm still not sure. I need to read more sched code.
You shouldn't ever set another tasks ->state.
--
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