aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorChuansheng Liu <chuansheng.liu@intel.com>2014-01-11 22:26:33 -0500
committerTejun Heo <tj@kernel.org>2014-01-11 22:26:33 -0500
commit440a11360326044a9addf1c652a0364aad0be90c (patch)
tree2dc89eebb6efabf3427e71106c464092dca074d7 /kernel/workqueue.c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
workqueue: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
In case CONFIG_DEBUG_OBJECTS_WORK is defined, it is needed to call destroy_work_on_stack() which frees the debug object to pair with INIT_WORK_ONSTACK(). Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 987293d03ebc..00df11270325 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4776,6 +4776,7 @@ static int workqueue_cpu_down_callback(struct notifier_block *nfb,
4776 4776
4777 /* wait for per-cpu unbinding to finish */ 4777 /* wait for per-cpu unbinding to finish */
4778 flush_work(&unbind_work); 4778 flush_work(&unbind_work);
4779 destroy_work_on_stack(&unbind_work);
4779 break; 4780 break;
4780 } 4781 }
4781 return NOTIFY_OK; 4782 return NOTIFY_OK;
@@ -4822,6 +4823,7 @@ long work_on_cpu(int cpu, long (*fn)(void *), void *arg)
4822 */ 4823 */
4823 __flush_work(&wfc.work); 4824 __flush_work(&wfc.work);
4824 4825
4826 destroy_work_on_stack(&wfc.work);
4825 return wfc.ret; 4827 return wfc.ret;
4826} 4828}
4827EXPORT_SYMBOL_GPL(work_on_cpu); 4829EXPORT_SYMBOL_GPL(work_on_cpu);