Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ff0c61d authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Benjamin Herrenschmidt
Browse files

powerpc: Mask smp_processor_id() false positive



The rtas_event_scan() function uses smp_processor_id() to select a
starting point in cpu_online_mask, and does so under the protection
of get_online_cpus().  This might not select the current processor
in any case, so switch to raw_smp_processor_id().

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 31116f0b
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -412,7 +412,8 @@ static void rtas_event_scan(struct work_struct *w)


	get_online_cpus();
	get_online_cpus();


	cpu = cpumask_next(smp_processor_id(), cpu_online_mask);
	/* raw_ OK because just using CPU as starting point. */
	cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
        if (cpu >= nr_cpu_ids) {
        if (cpu >= nr_cpu_ids) {
		cpu = cpumask_first(cpu_online_mask);
		cpu = cpumask_first(cpu_online_mask);