lkml.org 
[lkml]   [2009]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 3/3 -mm] generic-ipi: fix the race between generic_smp_call_function_*() and hotplug_cfd()
    From
    Date
    On Wed, 2009-07-29 at 16:31 -0700, Andrew Morton wrote:

    > -void generic_smp_call_function_interrupt(void)
    > +static void
    > +__generic_smp_call_function_interrupt(int cpu, int run_callbacks)
    > {
    > struct call_function_data *data;
    > - int cpu = smp_processor_id();
    >
    > /*
    > * Ensure entry is visible on call_function_queue after we have
    > @@ -169,12 +165,18 @@ void generic_smp_call_function_interrupt

    > +static void
    > +__generic_smp_call_function_single_interrupt(int cpu, int run_callbacks)
    > {
    > - struct call_single_queue *q = &__get_cpu_var(call_single_queue);
    > + struct call_single_queue *q = &per_cpu(call_single_queue, cpu);
    > unsigned int data_flags;
    > LIST_HEAD(list);
    >

    It introduces this run_callbacks thing to two functions, but nothing
    actually uses that... makes me suspicious there's something missing.


    > case CPU_DEAD_FROZEN:
    > + local_irq_save(flags);
    > + __generic_smp_call_function_interrupt(cpu, 0);
    > + __generic_smp_call_function_single_interrupt(cpu, 0);
    > + local_irq_restore(flags);

    Doing the callbacks from a different cpu than they were queued on seems
    like a fine way to mess things up.


    \
     
     \ /
      Last update: 2009-07-30 08:51    [W:0.024 / U:0.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site