From: Iulia Manda Date: Mon, 17 Mar 2014 13:21:21 +0000 (+0200) Subject: torture: Notice if an all-zero cpumask is passed inside a critical section X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~26^2^2~2^3~13 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed63b199c5b58ed150ce50f1ea68de54669b13f;p=pandora-kernel.git torture: Notice if an all-zero cpumask is passed inside a critical section In torture_shuffle_tasks function, the check if an all-zero mask can be passed to set_cpus_allowed_ptr() is redundant after clearing the shuffle_idle_cpu bit. If the mask had more than one bit set, after clearing a bit it has at least one bit set. If the mask had only one bit set, a check is made at the beginning, where the function returns, as there is no need to shuffle only one cpu. Also, this code is executed inside a critical section, delimited by get_online_cpus(), and put_online_cpus(), preventing CPUs from leaving between the check of num_online_cpus and the calls to set_cpus_allowed_ptr() function. Signed-off-by: Iulia Manda Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- Reading git-diff-tree failed