Blackfin: don't touch task->cpus_allowed directly
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tue, 26 Apr 2011 01:56:42 +0000 (10:56 +0900)
committerMike Frysinger <vapier@gentoo.org>
Wed, 25 May 2011 12:24:10 +0000 (08:24 -0400)
Every callter (except kthread_bind) should use proper
set_cpus_allowed_ptr() APIs.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/kernel/process.c

index b407bc8..6a660fa 100644 (file)
@@ -171,10 +171,8 @@ asmlinkage int bfin_clone(struct pt_regs *regs)
        unsigned long newsp;
 
 #ifdef __ARCH_SYNC_CORE_DCACHE
-       if (current->rt.nr_cpus_allowed == num_possible_cpus()) {
-               current->cpus_allowed = cpumask_of_cpu(smp_processor_id());
-               current->rt.nr_cpus_allowed = 1;
-       }
+       if (current->rt.nr_cpus_allowed == num_possible_cpus())
+               set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
 #endif
 
        /* syscall2 puts clone_flags in r0 and usp in r1 */