1
0
Fork 0
alistair23-linux/drivers/net
willy tarreau 290213667a net: mvneta: do not schedule in mvneta_tx_timeout
If a queue timeout is reported, we can oops because of some
schedules while the caller is atomic, as shown below :

  mvneta d0070000.ethernet eth0: tx timeout
  BUG: scheduling while atomic: bash/1528/0x00000100
  Modules linked in: slhttp_ethdiv(C) [last unloaded: slhttp_ethdiv]
  CPU: 2 PID: 1528 Comm: bash Tainted: G        WC   3.13.0-rc4-mvebu-nf #180
  [<c0011bd9>] (unwind_backtrace+0x1/0x98) from [<c000f1ab>] (show_stack+0xb/0xc)
  [<c000f1ab>] (show_stack+0xb/0xc) from [<c02ad323>] (dump_stack+0x4f/0x64)
  [<c02ad323>] (dump_stack+0x4f/0x64) from [<c02abe67>] (__schedule_bug+0x37/0x4c)
  [<c02abe67>] (__schedule_bug+0x37/0x4c) from [<c02ae261>] (__schedule+0x325/0x3ec)
  [<c02ae261>] (__schedule+0x325/0x3ec) from [<c02adb97>] (schedule_timeout+0xb7/0x118)
  [<c02adb97>] (schedule_timeout+0xb7/0x118) from [<c0020a67>] (msleep+0xf/0x14)
  [<c0020a67>] (msleep+0xf/0x14) from [<c01dcbe5>] (mvneta_stop_dev+0x21/0x194)
  [<c01dcbe5>] (mvneta_stop_dev+0x21/0x194) from [<c01dcfe9>] (mvneta_tx_timeout+0x19/0x24)
  [<c01dcfe9>] (mvneta_tx_timeout+0x19/0x24) from [<c024afc7>] (dev_watchdog+0x18b/0x1c4)
  [<c024afc7>] (dev_watchdog+0x18b/0x1c4) from [<c0020b53>] (call_timer_fn.isra.27+0x17/0x5c)
  [<c0020b53>] (call_timer_fn.isra.27+0x17/0x5c) from [<c0020cad>] (run_timer_softirq+0x115/0x170)
  [<c0020cad>] (run_timer_softirq+0x115/0x170) from [<c001ccb9>] (__do_softirq+0xbd/0x1a8)
  [<c001ccb9>] (__do_softirq+0xbd/0x1a8) from [<c001cfad>] (irq_exit+0x61/0x98)
  [<c001cfad>] (irq_exit+0x61/0x98) from [<c000d4bf>] (handle_IRQ+0x27/0x60)
  [<c000d4bf>] (handle_IRQ+0x27/0x60) from [<c000843b>] (armada_370_xp_handle_irq+0x33/0xc8)
  [<c000843b>] (armada_370_xp_handle_irq+0x33/0xc8) from [<c000fba9>] (__irq_usr+0x49/0x60)

Ben Hutchings attempted to propose a better fix consisting in using a
scheduled work for this, but while it fixed this panic, it caused other
random freezes and panics proving that the reset sequence in the driver
is unreliable and that additional fixes should be investigated.

When sending multiple streams over a link limited to 100 Mbps, Tx timeouts
happen from time to time, and the driver correctly recovers only when the
function is disabled.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16 15:15:42 -08:00
..
appletalk
arcnet drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
bonding bonding: use __dev_get_by_name instead of dev_get_by_name to find interface 2014-01-14 18:50:46 -08:00
caif drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
can drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
cris
dsa
ethernet net: mvneta: do not schedule in mvneta_tx_timeout 2014-01-16 15:15:42 -08:00
fddi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
hamradio Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
hippi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
hyperv Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
ieee802154 net: ieee802154: remove unnecessary spi_set_drvdata() 2013-12-10 22:31:32 -05:00
irda drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
phy drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
plip net: plip: slight optimization of addr compare 2013-12-31 16:48:33 -05:00
ppp ppp: slight optimization of addr compare 2013-12-26 13:31:33 -05:00
slip slip/slcan: added locking in wakeup function 2013-09-20 15:38:26 -04:00
team net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
usb drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
vmxnet3 drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
wan drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
wimax wimax: Remove extern from function prototypes 2013-09-24 16:46:22 -07:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
xen-netback xen-netback: use new skb_checksum_setup function 2014-01-14 14:24:19 -08:00
Kconfig
LICENSE.SRC
Makefile
Space.c drivers: net: Include new header file in sbni.c 2013-12-19 18:51:20 -05:00
dummy.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
eql.c eql: use __dev_get_by_name instead of dev_get_by_name to find interface 2014-01-14 18:50:46 -08:00
ifb.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
loopback.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
macvtap.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
mdio.c mdio: unused ethtool functions 2013-12-26 13:29:35 -05:00
mii.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-04 13:48:30 -05:00
nlmon.c net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
veth.c Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:30:30 +09:00
virtio_net.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
vxlan.c net: vxlan: properly cleanup devs on module unload 2014-01-14 23:38:39 -08:00
xen-netfront.c xen-netfront: use new skb_checksum_setup function 2014-01-14 14:24:19 -08:00