diff options
| author | 2017-12-11 17:01:08 +1100 | |
|---|---|---|
| committer | 2017-12-11 17:01:08 +1100 | |
| commit | d21bd6898336a7892914d308d5e0868f0b863571 (patch) | |
| tree | f5f756c25348b5a6c1ce9ddbaa7d1ecd1bef40b0 /kernel/workqueue_internal.h | |
| parent | MAINTAINERS: update the IMA, EVM, trusted-keys, encrypted-keys entries (diff) | |
| parent | Linux 4.15-rc3 (diff) | |
Sync to v4.15-rc3 for security subsystem developers to work against.
Diffstat (limited to 'kernel/workqueue_internal.h')
| -rw-r--r-- | kernel/workqueue_internal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h index 8635417c587b..d390d1be3748 100644 --- a/kernel/workqueue_internal.h +++ b/kernel/workqueue_internal.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * kernel/workqueue_internal.h * @@ -9,6 +10,7 @@ #include <linux/workqueue.h> #include <linux/kthread.h> +#include <linux/preempt.h> struct worker_pool; @@ -59,7 +61,7 @@ struct worker { */ static inline struct worker *current_wq_worker(void) { - if (current->flags & PF_WQ_WORKER) + if (in_task() && (current->flags & PF_WQ_WORKER)) return kthread_data(current); return NULL; } |
