1
0
Fork 0
alistair23-linux/drivers
Fugang Duan dd7c2b79a9 MLK-24217 net: ethernet: stmmac: free tx skb buffer in stmmac_resume()
When do suspend/resume test, there have WARN_ON() log dump from
stmmac_xmit() funciton, the code logic:
	entry = tx_q->cur_tx;
	first_entry = entry;
	WARN_ON(tx_q->tx_skbuff[first_entry]);

In normal case, tx_q->tx_skbuff[txq->cur_tx] should be NULL because
the skb should be handled and freed in stmmac_tx_clean().

But stmmac_resume() reset queue parameters like below, skb buffers
may not be freed.
	tx_q->cur_tx = 0;
	tx_q->dirty_tx = 0;

So free tx skb buffer in stmmac_resume() to avoid warning and
memory leak.

log:
[   46.139824] ------------[ cut here ]------------
[   46.144453] WARNING: CPU: 0 PID: 0 at drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3235 stmmac_xmit+0x7a0/0x9d0
[   46.154969] Modules linked in: crct10dif_ce vvcam(O) flexcan can_dev
[   46.161328] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O      5.4.24-2.1.0+g2ad925d15481 #1
[   46.170369] Hardware name: NXP i.MX8MPlus EVK board (DT)
[   46.175677] pstate: 80000005 (Nzcv daif -PAN -UAO)
[   46.180465] pc : stmmac_xmit+0x7a0/0x9d0
[   46.184387] lr : dev_hard_start_xmit+0x94/0x158
[   46.188913] sp : ffff800010003cc0
[   46.192224] x29: ffff800010003cc0 x28: ffff000177e2a100
[   46.197533] x27: ffff000176ef0840 x26: ffff000176ef0090
[   46.202842] x25: 0000000000000000 x24: 0000000000000000
[   46.208151] x23: 0000000000000003 x22: ffff8000119ddd30
[   46.213460] x21: ffff00017636f000 x20: ffff000176ef0cc0
[   46.218769] x19: 0000000000000003 x18: 0000000000000000
[   46.224078] x17: 0000000000000000 x16: 0000000000000000
[   46.229386] x15: 0000000000000079 x14: 0000000000000000
[   46.234695] x13: 0000000000000003 x12: 0000000000000003
[   46.240003] x11: 0000000000000010 x10: 0000000000000010
[   46.245312] x9 : ffff00017002b140 x8 : 0000000000000000
[   46.250621] x7 : ffff00017636f000 x6 : 0000000000000010
[   46.255930] x5 : 0000000000000001 x4 : ffff000176ef0000
[   46.261238] x3 : 0000000000000003 x2 : 00000000ffffffff
[   46.266547] x1 : ffff000177e2a000 x0 : 0000000000000000
[   46.271856] Call trace:
[   46.274302]  stmmac_xmit+0x7a0/0x9d0
[   46.277874]  dev_hard_start_xmit+0x94/0x158
[   46.282056]  sch_direct_xmit+0x11c/0x338
[   46.285976]  __qdisc_run+0x118/0x5f0
[   46.289549]  net_tx_action+0x110/0x198
[   46.293297]  __do_softirq+0x120/0x23c
[   46.296958]  irq_exit+0xb8/0xd8
[   46.300098]  __handle_domain_irq+0x64/0xb8
[   46.304191]  gic_handle_irq+0x5c/0x148
[   46.307936]  el1_irq+0xb8/0x180
[   46.311076]  cpuidle_enter_state+0x84/0x360
[   46.315256]  cpuidle_enter+0x34/0x48
[   46.318829]  call_cpuidle+0x18/0x38
[   46.322314]  do_idle+0x1e0/0x280
[   46.325539]  cpu_startup_entry+0x24/0x40
[   46.329460]  rest_init+0xd4/0xe0
[   46.332687]  arch_call_rest_init+0xc/0x14
[   46.336695]  start_kernel+0x420/0x44c
[   46.340353] ---[ end trace bc1ee695123cbacd ]---

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-06-02 16:04:02 +08:00
..
accessibility
acpi ACPI: watchdog: Fix gas->access_width usage 2020-03-05 16:43:42 +01:00
amba
android binder: fix log spam for existing debugfs file creation. 2020-02-01 09:34:35 +00:00
ata This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
atm fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-24 08:36:36 +01:00
auxdisplay
base regmap: debugfs: check count when read regmap file 2020-04-14 17:12:03 +08:00
bcma
block floppy: check FDC index for errors before assigning it 2020-02-28 17:22:14 +01:00
bluetooth Bluetooth: btusb: Disable runtime suspend on Realtek devices 2020-02-11 04:35:09 -08:00
bus This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 19:18:25 +01:00
char This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
clk MLK-24135 clk: imx: Add a temporary workaround for suspend hang casued by the EQOS module 2020-05-29 19:29:49 +08:00
clocksource clocksource: davinci: only enable clockevents once tim34 is initialized 2020-02-24 08:36:46 +01:00
connector
counter
cpufreq MLK-23888 cpufreq: imx7ulp: Fix cpufreq probe failure due to defer probe 2020-05-07 13:38:42 +08:00
cpuidle cpuidle: teo: Avoid using "early hits" incorrectly 2020-02-05 21:22:52 +00:00
crypto MLK-23801-4 crypto: caam - fix use-after-free KASAN issue for RSA algorithms 2020-04-16 17:53:59 +03:00
dax
dca
devfreq Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" 2020-03-05 16:43:43 +01:00
dio
dma MLK-23540 dmaengine: imx-sdma: restore DONEx_CONFIG register 2020-05-26 19:06:16 +08:00
dma-buf This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
edac This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
eisa
extcon extcon-intel-cht-wc: Don't reset USB data connection at probe 2020-02-01 09:34:46 +00:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:20:06 +01:00
firmware HSM-292 firmware: imx: seco_mu: Increase MAX_DATA_SIZE_PER_USER 2020-05-30 03:43:21 +02:00
fpga
fsi fsi: core: Fix small accesses and unaligned offsets via sysfs 2019-12-31 16:45:09 +01:00
gnss
gpio gpio: imx-rpmsg: register gpio chip after rpmsg channel ready 2020-05-08 10:06:56 +08:00
gpu MLK-24146 drm: dw_hdmi: cec: Add cec suspend/resume function 2020-05-28 19:39:01 +08:00
greybus
hid HID: hiddev: Fix race in in hiddev_disconnect() 2020-03-05 16:43:45 +01:00
hsi
hv hv_balloon: Balloon up according to request page number 2020-02-11 04:35:21 -08:00
hwmon This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
hwspinlock
hwtracing intel_th: msu: Fix window switching without windows 2019-12-31 16:46:09 +01:00
i2c This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
i3c
ide ide: serverworks: potential overflow in svwks_set_pio_mode() 2020-02-24 08:36:53 +01:00
idle
iio This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
infiniband RDMA/hns: Bugfix for posting a wqe with sge 2020-03-05 16:43:49 +01:00
input This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
interconnect
iommu iommu/qcom: Fix bogus detach logic 2020-02-28 17:22:12 +01:00
ipack
irqchip MLK-24052 irqchip: imx-intmux: Out-of-bounds access 2020-05-18 18:16:34 +08:00
isdn
leds leds: pca963x: Fix open-drain initialization 2020-02-24 08:36:24 +01:00
lightnvm
macintosh macintosh: therm_windtunnel: fix regression when instantiating devices 2020-03-05 16:43:43 +01:00
mailbox MLK-23995 mailbox: imx: fix build warning 2020-05-13 10:44:15 +08:00
mcb
md bcache: properly initialize 'path' and 'err' in register_bcache() 2020-02-24 08:37:03 +01:00
media MLK-24138: media: i2c: remove redundant mode info checking for ov5640 2020-05-29 10:01:30 +08:00
memory This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
memstick
message scsi: mptfusion: Fix double fetch bug in ioctl 2020-01-23 08:22:35 +01:00
mfd This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
misc This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
mmc This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
mtd MLK-24011: mtd: nand: gpmi: removed the redundant runtime_pm ops 2020-05-14 18:04:08 -05:00
mux
mxc MGS-5709 [#imx-1439] fix gpu suspend/resume stuck 2020-05-28 19:53:55 +08:00
net MLK-24217 net: ethernet: stmmac: free tx skb buffer in stmmac_resume() 2020-06-02 16:04:02 +08:00
nfc nfc: pn544: Fix occasional HW initialization failure 2020-03-05 16:43:32 +01:00
ntb
nubus
nvdimm libnvdimm/btt: fix variable 'rc' set but not used 2020-01-04 19:18:12 +01:00
nvme nvme-pci: Hold cq_poll_lock while completing CQEs 2020-03-05 16:43:46 +01:00
nvmem This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
of This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
opp opp: Free static OPPs on errors while adding them 2020-02-24 08:36:34 +01:00
oprofile
parisc
parport parport: load lowlevel driver if ports not found 2019-12-31 16:45:25 +01:00
pci MLK-24008 PCI: imx: refine the codes to do compliance tests 2020-05-14 11:31:16 +08:00
pcmcia
perf This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
phy MLK-24041: phy: fsl: sync code change with LF branch 2020-05-19 14:02:42 +08:00
pinctrl This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
platform platform/x86: intel_mid_powerbtn: Take a copy of ddata 2020-02-14 16:34:12 -05:00
pnp
power This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
powercap powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online() 2020-01-14 20:08:18 +01:00
pps
ps3
ptp This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
pwm This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
rapidio
ras
regulator MLK-23562: regulator: core: adjust supply voltage in bypass 2020-03-10 23:22:01 +08:00
remoteproc MLK-23882 remoteproc: imx_rproc: check resource table header 2020-04-30 16:05:48 +08:00
reset MLK-23754-9 reset: imx7: add the M4 core reset for i.MX8MQ 2020-04-09 10:35:39 +08:00
rpmsg This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
rtc MLK-23940-2 rtc: snvs: Add necessary clock operations for RTC APIs 2020-05-23 08:42:23 +08:00
s390 s390/qeth: vnicc Fix EOPNOTSUPP precedence 2020-03-05 16:43:46 +01:00
sbus
scsi This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
sfi
sh
siox
slimbus
soc MLK-23822: soc: imx: secvio: Fix boot message when nvmem not initialised 2020-05-11 17:46:23 +02:00
soundwire soundwire: intel: fix PDI/stream mapping for Bulk 2019-12-31 16:45:11 +01:00
spi MLK-24176-1 spi: lpspi: fix using CS discontinuously on i.MX8DXLEVK 2020-05-27 18:15:36 +08:00
spmi spmi: pmic-arb: Set lockdep class for hierarchical irq domains 2020-02-19 19:53:07 +01:00
ssb
staging MLK-23860: media: imx: improve calculation for csi RXHS_SETTLE parameter 2020-05-20 16:33:24 +08:00
target scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-28 17:22:25 +01:00
tc
tee This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
thermal MLK-23627 thermal: imx_sc_thermal: Fix incorrect data type 2020-03-19 16:45:49 +08:00
thunderbolt thunderbolt: Prevent crash if non-active NVMem file is read 2020-02-28 17:22:13 +01:00
tty This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
uio uio: Add driver for inter-VM shared memory device 2020-04-29 15:03:05 +08:00
usb MLK-23913-7 usb: cdns3: ep0: re-init request list at cdns3_ep0_config 2020-05-11 07:14:37 +08:00
vfio This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
vhost vhost: Check docket sk_family instead of call getname 2020-03-05 16:43:44 +01:00
video This is the 5.4.24 stable release 2020-03-08 18:57:18 +08:00
virt
virtio virtio: Add virtio-over-ivshmem transport driver 2020-04-29 15:03:05 +08:00
visorbus visorbus: fix uninitialized variable access 2020-02-24 08:36:47 +01:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-24 08:36:48 +01:00
w1
watchdog ACPI: watchdog: Fix gas->access_width usage 2020-03-05 16:43:42 +01:00
xen MLK-23960-2 xen: swtiotlb: fix free coherent 2020-05-09 18:31:19 +08:00
zorro
Kconfig
Makefile