lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[082/140] powerpc: Fix logic error in fixup_irqs
    2.6.33-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Johannes Berg <johannes@sipsolutions.net>

    commit 3cd8519248e9e17d982c6fab0f1a89bca6feb49a upstream.

    When SPARSE_IRQ is set, irq_to_desc() can
    return NULL. While the code here has a
    check for NULL, it's not really correct.
    Fix it by separating the check for it.

    This fixes CPU hot unplug for me.

    Reported-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
    Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    arch/powerpc/kernel/irq.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/arch/powerpc/kernel/irq.c
    +++ b/arch/powerpc/kernel/irq.c
    @@ -247,7 +247,10 @@ void fixup_irqs(cpumask_t map)
    cpumask_t mask;

    desc = irq_to_desc(irq);
    - if (desc && desc->status & IRQ_PER_CPU)
    + if (!desc)
    + continue;
    +
    + if (desc->status & IRQ_PER_CPU)
    continue;

    cpumask_and(&mask, desc->affinity, &map);



    \
     
     \ /
      Last update: 2010-07-30 19:55    [W:0.018 / U:0.536 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site