lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080307120644.7031.14474.stgit@novell1.haskins.net>
Date:	Fri, 07 Mar 2008 07:11:43 -0500
From:	Gregory Haskins <ghaskins@...ell.com>
To:	rostedt@...dmis.org, mingo@...e.he
Cc:	linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org,
	ghaskins@...ell.com
Subject: [PATCH] RESEND: fix cpus_allowed settings

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@...ell.com>
---

 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ