workqueue: fix spurious CPU locality WARN from process_one_work()
authorTejun Heo <tj@kernel.org>
Sun, 22 Jul 2012 17:16:34 +0000 (10:16 -0700)
committerMandar Padmawar <mpadmawar@nvidia.com>
Thu, 9 May 2013 06:36:04 +0000 (23:36 -0700)
commit411c7d962b5cfc99e7c1e701e5f5cfca6c9d2334
tree89ed28131be8aca09dd8d33021bd915583112546
parentd9361d270b87089b35e01721968d77fdf4fa6359
workqueue: fix spurious CPU locality WARN from process_one_work()

25511a4776 "workqueue: reimplement CPU online rebinding to handle idle
workers" added CPU locality sanity check in process_one_work().  It
triggers if a worker is executing on a different CPU without UNBOUND
or REBIND set.

This works for all normal workers but rescuers can trigger this
spuriously when they're serving the unbound or a disassociated
global_cwq - rescuers don't have either flag set and thus its
gcwq->cpu can be a different value including %WORK_CPU_UNBOUND.

Fix it by additionally testing %GCWQ_DISASSOCIATED.

bug 1237774

Change-Id: I7ac841fb02f97c354f096df1715669acca0265b5
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
LKML-Refence: <20120721213656.GA7783@linux.vnet.ibm.com>
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/226758
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
kernel/workqueue.c