Re: [PATCH] kernel/kthread.c: need spin_lock_irq() for 'worker'before main looping, since it can "WARN_ON(worker->task)".
From: Thomas Gleixner
Date: Wed Jun 19 2013 - 04:44:11 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/