[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:
Russell King 2007-06-02 15:36:37 +01:00 committed by Russell King
parent 29c349d22c
commit f72267c30f
1 changed files with 2 additions and 0 deletions

View File

@ -200,8 +200,10 @@ static int em_call_function(int (*fn)(void))
data.fn = fn;
data.ret = 0;
preempt_disable();
smp_call_function(em_func, &data, 1, 1);
em_func(&data);
preempt_enable();
return data.ret;
}