summaryrefslogtreecommitdiffstats
path: root/kernel/time/clocksource.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-07-02 10:03:50 +0200
committerTejun Heo <tj@kernel.org>2010-07-02 10:03:50 +0200
commitcb444766996395d4370bcc17ec895dd4e13ceb72 (patch)
treee682bd69dafadae8b27861888ec0802107d5a93a /kernel/time/clocksource.c
parentfb0e7beb5c1b6fb4da786ba709d7138373d5fb22 (diff)
downloadop-kernel-dev-cb444766996395d4370bcc17ec895dd4e13ceb72.zip
op-kernel-dev-cb444766996395d4370bcc17ec895dd4e13ceb72.tar.gz
workqueue: use worker_set/clr_flags() only from worker itself
worker_set/clr_flags() assume that if none of NOT_RUNNING flags is set the worker must be contributing to nr_running which is only true if the worker is actually running. As when called from self, it is guaranteed that the worker is running, those functions can be safely used from the worker itself and they aren't necessary from other places anyway. Make the following changes to fix the bug. * Make worker_set/clr_flags() whine if not called from self. * Convert all places which called those functions from other tasks to manipulate flags directly. * Make trustee_thread() directly clear nr_running after setting WORKER_ROGUE on all workers. This is the only place where nr_running manipulation is necessary outside of workers themselves. * While at it, add sanity check for nr_running in worker_enter_idle(). Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/time/clocksource.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud