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]
Date:	Sat, 25 Aug 2007 20:26:06 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Cliff Wickman <cpw@....com>, Paul Jackson <pj@....com>,
	Paul Menage <menage@...gle.com>
Cc:	linux-kernel@...r.kernel.org
Subject: cpuset: attach_task() vs sched_setaffinity() race?

After the brief look at kernel/cpuset.c, it seems that attach_task() should
guarantee that the task can't use CPUs outside of cpuset->cpus_allowed.

But this looks racy wrt sched_setaffinity() which does

	cpus_allowed = cpuset_cpus_allowed(p);
	// callback_mutex is free
	set_cpus_allowed(p);

What if attach_task()->set_cpus_allowed() happens in between?


Another question: update_cpumask(cs) does nothing with the tasks attached to
that cpuset, why? It may take a while before the task actually migrates to the
new CPU.

Thanks,

Oleg.

-
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