linux/drivers
Nimrod Andy 94191fd671 net: fec: Fix NAPI race
Do camera capture test on i.MX6q sabresd board, and save the capture data to
nfs rootfs. The command is:
gst-launch-1.0 -e imxv4l2src device=/dev/video1 num-buffers=2592000 ! tee name=t !
queue ! imxv4l2sink sync=false t. ! queue ! vpuenc ! queue ! mux. pulsesrc num-buffers=3720937
blocksize=4096 ! 'audio/x-raw, rate=44100, channels=2' ! queue ! imxmp3enc ! mpegaudioparse !
queue ! mux. qtmux name=mux ! filesink location=video_recording_long.mov

After about 10 hours running, there have net watchdog timeout kernel dump:
...
WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x2b4/0x2d8()
NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.24-01051-gdb840b7 #440
[<80014e6c>] (unwind_backtrace) from [<800118ac>] (show_stack+0x10/0x14)
[<800118ac>] (show_stack) from [<806ae3f0>] (dump_stack+0x78/0xc0)
[<806ae3f0>] (dump_stack) from [<8002b504>] (warn_slowpath_common+0x68/0x8c)
[<8002b504>] (warn_slowpath_common) from [<8002b558>] (warn_slowpath_fmt+0x30/0x40)
[<8002b558>] (warn_slowpath_fmt) from [<8055e0d4>] (dev_watchdog+0x2b4/0x2d8)
[<8055e0d4>] (dev_watchdog) from [<800352d8>] (call_timer_fn.isra.33+0x24/0x8c)
[<800352d8>] (call_timer_fn.isra.33) from [<800354c4>] (run_timer_softirq+0x184/0x220)
[<800354c4>] (run_timer_softirq) from [<8002f420>] (__do_softirq+0xc0/0x22c)
[<8002f420>] (__do_softirq) from [<8002f804>] (irq_exit+0xa8/0xf4)
[<8002f804>] (irq_exit) from [<8000ee5c>] (handle_IRQ+0x54/0xb4)
[<8000ee5c>] (handle_IRQ) from [<80008598>] (gic_handle_irq+0x28/0x5c)
[<80008598>] (gic_handle_irq) from [<800123c0>] (__irq_svc+0x40/0x74)
Exception stack(0x80d27f18 to 0x80d27f60)
7f00:                                                       80d27f60 0000014c
7f20: 8858c60e 0000004d 884e4540 0000004d ab7250d0 80d34348 00000000 00000000
7f40: 00000001 00000000 00000017 80d27f60 800702a4 80476e6c 600f0013 ffffffff
[<800123c0>] (__irq_svc) from [<80476e6c>] (cpuidle_enter_state+0x50/0xe0)
[<80476e6c>] (cpuidle_enter_state) from [<80476fa8>] (cpuidle_idle_call+0xac/0x154)
[<80476fa8>] (cpuidle_idle_call) from [<8000f174>] (arch_cpu_idle+0x8/0x44)
[<8000f174>] (arch_cpu_idle) from [<80064c54>] (cpu_startup_entry+0x100/0x158)
[<80064c54>] (cpu_startup_entry) from [<80cd8a9c>] (start_kernel+0x304/0x368)
---[ end trace 09ebd32fb032f86d ]---
...

There might have a race in napi_schedule(), leaving interrupts disabled forever.
After these patch, the case still work more than 40 hours running.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-16 15:23:29 -05:00
..
accessibility
acpi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
amba Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
ata Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
atm Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
auxdisplay
base Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
block Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2014-12-15 13:23:09 -05:00
bus Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cdrom
char Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
clk Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
clocksource Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
connector cn: verify msg->len before making callback 2014-11-26 19:09:01 -08:00
coresight coresight-replicator: remove .owner field for driver 2014-11-26 19:28:11 -08:00
cpufreq Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cpuidle Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
crypto Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dca
devfreq
dio
dma Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dma-buf
edac Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
eisa
extcon Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
firewire
firmware Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fmc
gpio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
gpu Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-12-12 10:26:47 -08:00
hsi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
hv Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
hwmon Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
hwspinlock
i2c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ide Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
idle
iio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
input Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
iommu Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ipack
irqchip Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-12-12 10:08:06 -08:00
leds Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
lguest virtio: allow finalize_features to fail 2014-12-09 16:32:32 +02:00
macintosh
mailbox Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mcb
md Three fixes for md 2014-12-14 12:13:05 -08:00
media Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
memory Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
memstick
message scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
mfd Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
misc Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
mmc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mtd Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
net net: fec: Fix NAPI race 2014-12-16 15:23:29 -05:00
nfc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ntb
nubus
of Merge branch 'i2c/for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-12-14 12:54:40 -08:00
oprofile
parisc
parport Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
pci Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pcmcia Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
phy Improvements in phy-core specifically on PHY core finds the PHY in the case 2014-11-27 08:25:20 -08:00
pinctrl Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
platform Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pnp
power Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
remoteproc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
reset Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rpmsg
rtc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
s390 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sbus
scsi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sfi
sh drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 03:08:24 +01:00
sn
soc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spmi
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
staging Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-12-12 10:08:06 -08:00
tc TC: Error handling clean-ups 2014-11-24 07:45:25 +01:00
thermal Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
thunderbolt
tty Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
uio Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
usb Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
uwb
vfio PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg() 2014-11-23 13:01:45 +01:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
video Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
virt
virtio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vlynq
vme
w1 Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
watchdog Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
xen xen: features and fixes for 3.19-rc0 2014-12-11 18:15:33 -08:00
zorro
Kconfig ARM: tegra: Move AHB Kconfig to drivers/amba 2014-11-26 09:43:25 +01:00
Makefile