All of lore.kernel.org
 help / color / mirror / Atom feed
* smp_call_function_single with wait=0 considered harmful
@ 2013-12-04 16:46 Christoph Hellwig
  2013-12-05 21:43 ` Bjorn Helgaas
  2014-02-28 12:26 ` Peter Zijlstra
  0 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2013-12-04 16:46 UTC (permalink / raw)
  To: Andrew Morton, Ingo Molnar, Thomas Gleixner, Tony Luck,
	Robert Richter, Bjorn Helgaas, Aaro Koskinen, David Daney
  Cc: linux-kernel

While doing my recent work on the generic smp function calls I noticed
that smp_call_function_single without the wait flag can't work, as
it allocates struct call_single_data on stack, and without the wait
flag will happily return before the IPI has been executed.

This affects the following callers:

  arch/ia64/kernel/mca.c:mca_cpu_callback()
  arch/ia64/kernel/smpboot.c:ia64_sync_itc()
  arch/x86/kernel/kvm.c:kvm_cpu_notify()
  arch/x86/oprofile/nmi_int.c:oprofile_cpu_notifier()
  arch/x86/pci/amd_bus.c:amd_cpu_notify()
  drivers/staging/octeon/ethernet-rx.c:cvm_oct_enable_one_cpu()
  kernel/stop_machine.c:stop_two_cpus()

It would be good to get these fixed so that we could remove the
parameter.  Either convert them to wait, or use a preallocated
call_single_data and __smp_call_function_single.

After that I'd like to remove the wait argument to prevent further
abuses.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-11 12:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-04 16:46 smp_call_function_single with wait=0 considered harmful Christoph Hellwig
2013-12-05 21:43 ` Bjorn Helgaas
2013-12-06 10:56   ` Christoph Hellwig
2014-02-28 12:26 ` Peter Zijlstra
2014-02-28 12:39   ` Peter Zijlstra
2014-02-28 17:06     ` Rik van Riel
2014-02-28 17:34     ` Prarit Bhargava
2014-03-11 12:36     ` [tip:sched/core] stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus() tip-bot for Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.