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

[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
...@@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void)) ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment