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

Commit f72267c3 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] Solve buggy smp_processor_id() usage



BUG: using smp_processor_id() in preemptible [00000001] code: opcontrol/427

Resolve this bug by ensuring that we're not using smp_processor_id() in
a preemptable context (by disabling preemption.)

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 29c349d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void))
	data.fn = fn;
	data.fn = fn;
	data.ret = 0;
	data.ret = 0;


	preempt_disable();
	smp_call_function(em_func, &data, 1, 1);
	smp_call_function(em_func, &data, 1, 1);
	em_func(&data);
	em_func(&data);
	preempt_enable();


	return data.ret;
	return data.ret;
}
}