linux-uconsole/drivers
Bernd Eckstein 9366f5dc84 usbnet: ipheth: fix racing condition
[ Upstream commit 94d250fae4 ]

Fix a racing condition in ipheth.c that can lead to slow performance.

Bug: In ipheth_tx(), netif_wake_queue() may be called on the callback
ipheth_sndbulk_callback(), _before_ netif_stop_queue() is called.
When this happens, the queue is stopped longer than it needs to be,
thus reducing network performance.

Fix: Move netif_stop_queue() in front of usb_submit_urb(). Now the order
is always correct. In case, usb_submit_urb() fails, the queue is woken up
again as callback will not fire.

Testing: This racing condition is usually not noticeable, as it has to
occur very frequently to slowdown the network. The callback from the USB
is usually triggered slow enough, so the situation does not appear.
However, on a Ubuntu Linux on VMWare Workstation, running on Windows 10,
the we loose the race quite often and the following speedup can be noticed:

Without this patch: Download:  4.10 Mbit/s, Upload:  4.01 Mbit/s
With this patch:    Download: 36.23 Mbit/s, Upload: 17.61 Mbit/s

Signed-off-by: Oliver Zweigle <Oliver.Zweigle@faro.com>
Signed-off-by: Bernd Eckstein <3ernd.Eckstein@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-19 08:18:04 +02:00
..
accessibility
acpi pstore: Convert buf_lock to semaphore 2019-06-11 12:20:52 +02:00
amba
android binder: fix race between munmap() and direct reclaim 2019-06-09 09:17:23 +02:00
ata libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk 2019-06-19 08:17:59 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:57 +01:00
auxdisplay auxdisplay: hd44780: Fix memory leak on ->remove() 2019-04-20 09:15:55 +02:00
base PM / core: Propagate dev->power.wakeup_path when no callbacks 2019-05-31 06:46:23 -07:00
bcma
block xen-blkfront: switch kcalloc to kvcalloc for large array allocation 2019-06-11 12:20:53 +02:00
bluetooth Bluetooth: hci_qca: Give enough time to ROME controller to bootup. 2019-05-31 06:46:16 -07:00
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:33:10 +02:00
char hwrng: omap - Set default quality 2019-05-31 06:46:31 -07:00
clk clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288 2019-06-15 11:54:08 +02:00
clocksource clocksource/drivers/oxnas: Fix OX820 compatible 2019-05-16 19:41:21 +02:00
connector connector: fix unsafe usage of ->real_parent 2019-03-19 13:12:38 +01:00
cpufreq cpufreq: kirkwood: fix possible object reference leak 2019-05-31 06:46:24 -07:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:47:08 +01:00
crypto crypto: vmx - ghash: do nosimd fallback manually 2019-06-04 08:02:34 +02:00
dax mm/huge_memory: fix vmf_insert_pfn_{pmd, pud}() crash, handle unaligned addresses 2019-05-22 07:37:40 +02:00
dca
devfreq
dio
dma dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:10 +02:00
dma-buf
edac EDAC/mpc85xx: Prevent building as a module 2019-06-15 11:54:03 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:46:23 -07:00
firewire
firmware pstore: Convert buf_lock to semaphore 2019-06-11 12:20:52 +02:00
fmc
fpga fpga: altera-cvp: fix 'bad IO access' on x86_64 2019-02-12 19:46:59 +01:00
fsi fsi: master-ast-cf: select GENERIC_ALLOCATOR 2018-12-17 09:24:35 +01:00
gnss gnss: sirf: fix premature wakeup interrupt enable 2019-03-10 07:17:21 +01:00
gpio gpio: vf610: Do not share irq_chip 2019-06-15 11:54:11 +02:00
gpu drm/i915/sdvo: Implement proper HDMI audio support for SDVO 2019-06-19 08:18:01 +02:00
hid HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary 2019-06-19 08:17:59 +02:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:54:04 +02:00
hwmon hwmon: (f71805f) Use request_muxed_region for Super-IO accesses 2019-05-31 06:46:22 -07:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2019-05-25 18:23:26 +02:00
i2c i2c: acorn: fix i2c warning 2019-06-19 08:18:00 +02:00
ide ide: fix a typo in the settings proc file name 2019-01-31 08:14:42 +01:00
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
iio iio: adc: ti-ads8688: fix timestamp is not updated in buffer 2019-06-09 09:17:15 +02:00
infiniband RDMA/hns: Fix bad endianess of port_pd variable 2019-05-31 06:46:28 -07:00
input Input: synaptics-rmi4 - fix possible double free 2019-05-16 19:41:25 +02:00
iommu iommu/arm-smmu: Avoid constant zero in TLBI writes 2019-06-19 08:18:00 +02:00
ipack
irqchip Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment" 2019-06-11 12:20:53 +02:00
isdn isdn: bas_gigaset: use usb_fill_int_urb() properly 2019-05-16 19:41:31 +02:00
leds leds: trigger: netdev: use memcpy in device_name_store 2019-05-04 09:20:22 +02:00
lightnvm lightnvm: pblk: add lock protection to list operations 2019-02-12 19:47:08 +01:00
macintosh
mailbox mailbox: stm32-ipcc: check invalid irq 2019-06-15 11:54:04 +02:00
mcb
md bcache: only set BCACHE_DEV_WB_RUNNING when cached device attached 2019-06-19 08:18:00 +02:00
media media: uvcvideo: Fix uvc_alloc_entity() allocation alignment 2019-06-09 09:17:24 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:23:32 +02:00
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:47:10 +01:00
message
mfd mfd: twl6040: Fix device init errors for ACCCTL register 2019-06-15 11:54:03 +02:00
misc Drivers: misc: fix out-of-bounds access in function param_set_kgdbts_var 2019-06-19 08:18:02 +02:00
mmc mmc: mmci: Prevent polling for busy detection in IRQ context 2019-06-15 11:54:05 +02:00
mtd mtd: spinand: macronix: Fix ECC Status Read 2019-06-11 12:20:50 +02:00
mux
net usbnet: ipheth: fix racing condition 2019-06-19 08:18:04 +02:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-05-16 19:41:25 +02:00
ntb
nubus
nvdimm libnvdimm: Fix compilation warnings with W=1 2019-06-19 08:18:03 +02:00
nvme nvme: fix memory leak for power latency tolerance 2019-06-19 08:18:03 +02:00
nvmem nvmem: sunxi_sid: Support SID on A83T and H5 2019-06-15 11:54:07 +02:00
of of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
opp OPP: Use opp_table->regulators to verify no regulator case 2019-02-12 19:47:08 +01:00
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2019-06-11 12:20:51 +02:00
parport parport_pc: fix find_superio io compare code, should use equal test. 2019-03-23 20:10:05 +01:00
pci PCI: xilinx: Check for __get_free_pages() failure 2019-06-15 11:54:10 +02:00
pcmcia
perf perf/arm-cci: Remove broken race mitigation 2019-05-31 06:46:17 -07:00
phy phy: mapphone-mdm6600: add gpiolib dependency 2019-05-31 06:46:20 -07:00
pinctrl pinctrl: samsung: fix leaked of_node references 2019-05-31 06:46:17 -07:00
platform platform/x86: pmc_atom: Add several Beckhoff Automation boards to critclk_systems DMI table 2019-06-19 08:18:03 +02:00
pnp
power power: supply: max14656: fix potential use-before-alloc 2019-06-15 11:54:09 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
pps
ps3
ptp ptp: Fix pass zero to ERR_PTR() in ptp_clock_register 2019-02-12 19:47:01 +01:00
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-15 11:54:10 +02:00
rapidio rapidio: fix a NULL pointer dereference when create_workqueue() fails 2019-06-15 11:53:59 +02:00
ras
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:33:15 +02:00
remoteproc
reset reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev 2019-05-08 07:21:47 +02:00
rpmsg
rtc rtc: xgene: fix possible race condition 2019-05-31 06:46:26 -07:00
s390 scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs) 2019-06-09 09:17:13 +02:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:15:17 +01:00
scsi scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-06-19 08:18:03 +02:00
sfi
sh
siox
slimbus slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register 2019-05-31 06:46:14 -07:00
sn
soc soc: renesas: Identify R-Car M3-W ES1.3 2019-06-15 11:54:11 +02:00
soundwire
spi dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:10 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:46:04 -07:00
staging staging: wlan-ng: fix adapter initialization failure 2019-06-09 09:17:21 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 20:09:59 +01:00
tc
tee tee: optee: avoid possible double list_del() 2019-02-12 19:47:08 +01:00
thermal drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER 2019-06-15 11:54:02 +02:00
thunderbolt thunderbolt: property: Fix a NULL pointer dereference 2019-05-31 06:46:31 -07:00
tty dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:10 +02:00
uio
usb usb: typec: fusb302: Check vconn is off when we start toggling 2019-06-15 11:54:11 +02:00
uwb
vfio vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:07 +02:00
vhost vhost: reject zero size iova range 2019-04-27 09:36:31 +02:00
video video: imsttfb: fix potential NULL pointer dereferences 2019-06-15 11:54:10 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:41:31 +02:00
virtio virtio_pci: fix a NULL pointer reference in vp_del_vqs 2019-05-10 17:54:08 +02:00
visorbus
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:46:14 -07:00
watchdog watchdog: fix compile time error of pretimeout governors 2019-06-15 11:54:06 +02:00
xen xen/pciback: Don't disable PCI_COMMAND on PCI device reset. 2019-06-04 08:02:34 +02:00
zorro
Kconfig
Makefile