[PATCH] RESEND: fix cpus_allowed settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ingo, Steve,
  I sent this patch a few weeks ago along with the migration_disable
series.  I think the controversy with the migration_disable feature
may have resulted in this fix being overlooked.  This patch is against
-rt, but the bug theoretically affects both -rt and sched-devel/mainline.
I can also whip up a sched-devel based patch if you like, but I think it
will apply trivially to both places.

Please consider it for inclusion.

Regards,
-Greg

-------------------------------
Subject: fix cpus_allowed settings

We miss setting nr_cpus_allowed for the kthread case since the normal
set_cpus_allowed() function is not used.

Signed-off-by: Gregory Haskins <ghaskins@xxxxxxxxxx>
---

 kernel/kthread.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/kthread.c b/kernel/kthread.c
index dcfe724..b193b47 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -170,6 +170,7 @@ void kthread_bind(struct task_struct *k, unsigned int cpu)
 	wait_task_inactive(k);
 	set_task_cpu(k, cpu);
 	k->cpus_allowed = cpumask_of_cpu(cpu);
+	k->nr_cpus_allowed = 1;
 }
 EXPORT_SYMBOL(kthread_bind);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux