diff options
| -rw-r--r-- | kernel/workqueue.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 987293d03ebc..f8942429268b 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -1736,16 +1736,17 @@ static struct worker *create_worker(struct worker_pool *pool) | |||
| 1736 | if (IS_ERR(worker->task)) | 1736 | if (IS_ERR(worker->task)) |
| 1737 | goto fail; | 1737 | goto fail; |
| 1738 | 1738 | ||
| 1739 | set_user_nice(worker->task, pool->attrs->nice); | ||
| 1740 | |||
| 1741 | /* prevent userland from meddling with cpumask of workqueue workers */ | ||
| 1742 | worker->task->flags |= PF_NO_SETAFFINITY; | ||
| 1743 | |||
| 1739 | /* | 1744 | /* |
| 1740 | * set_cpus_allowed_ptr() will fail if the cpumask doesn't have any | 1745 | * set_cpus_allowed_ptr() will fail if the cpumask doesn't have any |
| 1741 | * online CPUs. It'll be re-applied when any of the CPUs come up. | 1746 | * online CPUs. It'll be re-applied when any of the CPUs come up. |
| 1742 | */ | 1747 | */ |
| 1743 | set_user_nice(worker->task, pool->attrs->nice); | ||
| 1744 | set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask); | 1748 | set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask); |
| 1745 | 1749 | ||
| 1746 | /* prevent userland from meddling with cpumask of workqueue workers */ | ||
| 1747 | worker->task->flags |= PF_NO_SETAFFINITY; | ||
| 1748 | |||
| 1749 | /* | 1750 | /* |
| 1750 | * The caller is responsible for ensuring %POOL_DISASSOCIATED | 1751 | * The caller is responsible for ensuring %POOL_DISASSOCIATED |
| 1751 | * remains stable across this function. See the comments above the | 1752 | * remains stable across this function. See the comments above the |
