[lkml]   [2006]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch, -rc5-mm3] lock validator: fix ns83820.c irq-flags part 3
    On Sun, 2006-06-04 at 02:53 -0700, Barry K. Nathan wrote:
    > On 6/4/06, Arjan van de Ven <> wrote:
    > > just the preempt the next email from Barry; while fixing this one I
    > > looked at the usage of the locks more and found another patch needed...
    > [snip]
    > Nice try, but it didn't work. ~_^
    > I was about to reply to the previous ns83820 patch with my dmesg, when
    > I saw this one. I applied this patch too, and like the previous patch,
    > it reports an instance of illegal lock usage. My dmesg follows.
    > --

    ok this is a real driver deadlock:

    The ns83820 driver enabled interrupts (by unlocking the misc_lock with
    _irq) while still holding the rx_info.lock, which is required to be irq
    safe since it's used in the ISR like this:
    writel(1, dev->base + IER);

    This is can cause a deadlock if an irq was pending at the first
    spin_unlock_irq already, or if one would hit during kick_rx().
    Simply remove the first _irq solves this

    Signed-off-by: Arjan van de Ven <>

    drivers/net/ns83820.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6.17-rc5-mm3/drivers/net/ns83820.c
    --- linux-2.6.17-rc5-mm3.orig/drivers/net/ns83820.c
    +++ linux-2.6.17-rc5-mm3/drivers/net/ns83820.c
    @@ -808,7 +808,7 @@ static int ns83820_setup_rx(struct net_d

    writel(dev->IMR_cache, dev->base + IMR);
    writel(1, dev->base + IER);
    - spin_unlock_irq(&dev->misc_lock);
    + spin_unlock(&dev->misc_lock);


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-06-04 12:11    [W:0.021 / U:19.960 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site