diff options
| author | Chris Zankel <chris@zankel.net> | 2014-04-09 14:49:29 -0700 |
|---|---|---|
| committer | Chris Zankel <chris@zankel.net> | 2014-04-09 14:49:29 -0700 |
| commit | e86c4b67feb2c984314eef71314f26cfe39fef36 (patch) | |
| tree | 3c5a7e2216cdcd1d06b8729bf94eba6dc74a7959 /kernel/workqueue.c | |
| parent | b3fdfc1b4b641d372e35ced98814289bc60bc5d1 (diff) | |
| parent | 9c602629e34bad88a464e08de08118e80beee0d8 (diff) | |
Merge tag 'xtensa-for-next-20140406' of git://github.com/jcmvbkbc/linux-xtensa into for_next
Merging from Max' tree.
Xtensa fixes for 3.15:
- add missing cache manipulation symbol exports to fix build failures;
- sort extable at build time;
- clean up sysmem code, support memmap boot parameter;
- add highmem support for cores with non-aliasing caches;
- add DTS for xtfpga on KC705.
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 82ef9f3b747..193e977a10e 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1851,6 +1851,12 @@ static void destroy_worker(struct worker *worker) if (worker->flags & WORKER_IDLE) pool->nr_idle--; + /* + * Once WORKER_DIE is set, the kworker may destroy itself at any + * point. Pin to ensure the task stays until we're done with it. + */ + get_task_struct(worker->task); + list_del_init(&worker->entry); worker->flags |= WORKER_DIE; @@ -1859,6 +1865,7 @@ static void destroy_worker(struct worker *worker) spin_unlock_irq(&pool->lock); kthread_stop(worker->task); + put_task_struct(worker->task); kfree(worker); spin_lock_irq(&pool->lock); |
