[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1306191041570.4013@ionos.tec.linutronix.de>
Date: Wed, 19 Jun 2013 10:43:28 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Chen Gang <gang.chen@...anux.com>
cc: Tejun Heo <tj@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
laijs@...fujitsu.com, Andrew Morton <akpm@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/kthread.c: need spin_lock_irq() for 'worker'
before main looping, since it can "WARN_ON(worker->task)".
On Wed, 19 Jun 2013, Chen Gang wrote:
>
> Since "WARN_ON(worker->task)", we can not assume that 'worker->task'
> will be NULL before set 'current' to it.
It better is NULL and all that WARN_ON does is to verify that.
> So need let 'worker' lock protected too, just like it already lock
> protected all time in main looping.
No. That's pointless. This happens when the new worker starts up and
there is nothing which can modify worker->task at this point.
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