• Paul Mundt's avatar
    clocksource: Fix up a registration/IRQ race in the sh drivers. · da64c2a8
    Paul Mundt authored
    All of the SH clocksource drivers follow the scheme that the IRQ is setup
    prior to registering the clockevent. The interrupt handler in the
    clockevent cases looks to the event handler function pointer being filled
    in by the registration code, permitting us to get in to situations where
    asserted IRQs step in to the handler before registration has had a chance
    to complete and hitting a NULL pointer deref.
    
    In practice this is not an issue for most platforms, but some of them
    with fairly special loaders (or that are chain-loading from another
    kernel) may enter in to this situation. This fixes up the oops reported
    by Rafael on hp6xx.
    Reported-and-tested-by: default avatarRafael Ignacio Zurita <rafaelignacio.zurita@gmail.com>
    Cc: stable@kernel.org
    Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
    da64c2a8
sh_mtu2.c 8.18 KB