Commit 96348852 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'core-fixes-for-linus-2' of...

Merge branch 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic-ipi: fix stack and rcu interaction bug in smp_call_function_mask(), fix
parents 1c89ac55 c2fc1198
...@@ -135,7 +135,8 @@ void generic_smp_call_function_interrupt(void) ...@@ -135,7 +135,8 @@ void generic_smp_call_function_interrupt(void)
*/ */
smp_wmb(); smp_wmb();
data->csd.flags &= ~CSD_FLAG_WAIT; data->csd.flags &= ~CSD_FLAG_WAIT;
} else }
if (data->csd.flags & CSD_FLAG_ALLOC)
call_rcu(&data->rcu_head, rcu_free_call_data); call_rcu(&data->rcu_head, rcu_free_call_data);
} }
rcu_read_unlock(); rcu_read_unlock();
...@@ -289,10 +290,11 @@ static void smp_call_function_mask_quiesce_stack(cpumask_t mask) ...@@ -289,10 +290,11 @@ static void smp_call_function_mask_quiesce_stack(cpumask_t mask)
data.func = quiesce_dummy; data.func = quiesce_dummy;
data.info = NULL; data.info = NULL;
data.flags = CSD_FLAG_WAIT;
for_each_cpu_mask(cpu, mask) for_each_cpu_mask(cpu, mask) {
data.flags = CSD_FLAG_WAIT;
generic_exec_single(cpu, &data); generic_exec_single(cpu, &data);
}
} }
/** /**
...@@ -371,7 +373,7 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, ...@@ -371,7 +373,7 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
if (wait) { if (wait) {
csd_flag_wait(&data->csd); csd_flag_wait(&data->csd);
if (unlikely(slowpath)) if (unlikely(slowpath))
smp_call_function_mask_quiesce_stack(allbutself); smp_call_function_mask_quiesce_stack(mask);
} }
return 0; return 0;
......
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