Re: WARN_ON_ONCE() in process_one_work()?

From: Tejun Heo
Date: Tue Jul 03 2018 - 16:12:13 EST


Hello, Paul.

On Tue, Jul 03, 2018 at 09:40:44AM -0700, Paul E. McKenney wrote:
> > I will apply this, but be advised that I have not seen that WARN_ON_ONCE()
> > trigger since. :-/
>
> But I get a build error:
>
> kernel/workqueue.o: In function `worker_attach_to_pool':
> workqueue.c:(.text+0x63c): undefined reference to `cpuhp_target_state'
> workqueue.c:(.text+0x647): undefined reference to `cpuhp_current_state'
> /home/paulmck/public_git/linux-rcu/Makefile:1015: recipe for target 'vmlinux' failed
>
> My guess is that the worker_attach_to_pool() code needs to change so
> as to invoke cpuhp_current_state() and cpuhp_target_state() only in
> CONFIG_HOTPLUG_CPU=y kernels, but I figured I should defer to you.

Just to clarify, the bug happened on a kernel with cpuhp enabled,
right?

Thanks.

--
tejun