net: don't grab a mutex within a timer context in gianfar

Previous thread: forcedeth: fix checksum flag by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)

Next thread: ibm_newemac: Don't call dev_mc_add() before device is registered by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, August 28, 2008 - 1:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab9399...
Commit:     ab9399059bb85a94758f42fb25607e440e926cc6
Parent:     edcfe5f7e307846e578fb88d69fa27051fded0ab
Author:     Sebastian Siewior <bigeasy@linutronix.de>
AuthorDate: Tue Aug 19 21:12:45 2008 +0200
Committer:  Jeff Garzik <jgarzik@redhat.com>
CommitDate: Wed Aug 27 05:55:19 2008 -0400

    net: don't grab a mutex within a timer context in gianfar
    
    I got the following backtrace while network was unavailble:
    
    |NETDEV WATCHDOG: eth0: transmit timed out
    |BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/kernel/mutex.c:87
    |in_atomic():1, irqs_disabled():0
    |Call Trace:
    |[c0383d90] [c0006dd8] show_stack+0x48/0x184 (unreliable)
    |[c0383db0] [c001e938] __might_sleep+0xe0/0xf4
    |[c0383dc0] [c025a43c] mutex_lock+0x24/0x3c
    |[c0383de0] [c019005c] phy_stop+0x20/0x70
    |[c0383df0] [c018d4ec] stop_gfar+0x28/0xf4
    |[c0383e10] [c018e8c4] gfar_timeout+0x30/0x60
    |[c0383e20] [c01fe7c0] dev_watchdog+0xa8/0x144
    |[c0383e30] [c002f93c] run_timer_softirq+0x148/0x1c8
    |[c0383e60] [c002b084] __do_softirq+0x5c/0xc4
    |[c0383e80] [c00046fc] do_softirq+0x3c/0x54
    |[c0383e90] [c002ac60] irq_exit+0x3c/0x5c
    |[c0383ea0] [c000b378] timer_interrupt+0xe0/0xf8
    |[c0383ec0] [c000e5ac] ret_from_except+0x0/0x18
    |[c0383f80] [c000804c] cpu_idle+0xcc/0xdc
    |[c0383fa0] [c025c07c] etext+0x7c/0x90
    |[c0383fc0] [c0338960] start_kernel+0x294/0x2a8
    |[c0383ff0] [c00003dc] skpinv+0x304/0x340
    |------------[ cut here ]------------
    
    The phylock was once a spinlock but got changed into a mutex via
    commit 35b5f6b1a aka [PHYLIB: Locking fixes for PHY I/O potentially sleeping]
    
    Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
 drivers/net/gianfar.c |   22 ++++++++++++++++++----
 ...
Previous thread: forcedeth: fix checksum flag by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)

Next thread: ibm_newemac: Don't call dev_mc_add() before device is registered by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)