diff options
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r-- | kernel/kmod.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index b086006c59e7..ed8e7bd35074 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -40,6 +40,7 @@ #include <linux/ptrace.h> #include <linux/async.h> #include <asm/uaccess.h> +#include <linux/kthread.h> #include <trace/events/module.h> @@ -209,8 +210,14 @@ static int ____call_usermodehelper(void *data) flush_signal_handlers(current, 1); spin_unlock_irq(¤t->sighand->siglock); - /* We can run anywhere, unlike our parent keventd(). */ - set_cpus_allowed_ptr(current, cpu_all_mask); + /* + * Kthreadd can be restricted to a set of processors if the user wants + * to protect other processors from OS latencies. If that has happened + * then we do not want to disturb the other processors here either so we + * start the usermode helper threads only on the processors allowed for + * kthreadd. + */ + set_kthreadd_affinity(); /* * Our parent is keventd, which runs with elevated scheduling priority. |