mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-24 20:50:30 +00:00
[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: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
29c349d22c
commit
f72267c30f
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user