提交 f72267c3 编写于 作者: R Russell King 提交者: 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: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册