kernel_optimize_test/drivers
Nicolas Boichat b713996083 ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet
When the FW bundles multiple packets, pkt->act_len may be incorrect
as it refers to the first packet only (however, the FW will only
bundle packets that fit into the same pkt->alloc_len).

Before this patch, the skb length would be set (incorrectly) to
pkt->act_len in ath10k_sdio_mbox_rx_packet, and then later manually
adjusted in ath10k_sdio_mbox_rx_process_packet.

The first problem is that ath10k_sdio_mbox_rx_process_packet does not
use proper skb_put commands to adjust the length (it directly changes
skb->len), so we end up with a mismatch between skb->head + skb->tail
and skb->data + skb->len. This is quite serious, and causes corruptions
in the TCP stack, as the stack tries to coalesce packets, and relies
on skb->tail being correct (that is, skb_tail_pointer must point to
the first byte_after_ the data).

Instead of re-adjusting the size in ath10k_sdio_mbox_rx_process_packet,
this moves the code to ath10k_sdio_mbox_rx_packet, and also add a
bounds check, as skb_put would crash the kernel if not enough space is
available.

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00007-QCARMSWP-1.

Fixes: 8530b4e7b2 ("ath10k: sdio: set skb len for all rx packets")
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-12 17:53:02 +03:00
..
accessibility
acpi
amba
android
ata
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 14:23:31 -07:00
auxdisplay
base
bcma
block rbd: restore zeroing past the overlap when reading from parent 2019-08-28 12:34:11 +02:00
bluetooth
bus Hisilicon fixes for v5.3-rc 2019-08-29 17:23:52 +02:00
cdrom
char
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga FPGA Manager fixes for 5.3 2019-08-28 22:26:47 +02:00
fsi fsi: scom: Don't abort operations for minor errors 2019-08-28 22:59:18 +02:00
gnss
gpio gpio: Fix irqchip initialization order 2019-08-23 11:00:43 +02:00
gpu drm/i915 fixes for v5.3-rc7: 2019-08-30 10:55:29 +10:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing intel_th: pci: Add Tiger Lake support 2019-08-28 22:29:02 +02:00
i2c i2c: mediatek: disable zero-length transfers for mt8183 2019-08-30 15:06:17 +02:00
i3c
ide
idle
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
input
interconnect
iommu
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm table: fix invalid memory accesses with too high sector number 2019-08-23 10:11:42 -04:00
media
memory
memstick
message
mfd - Bug Fixes 2019-08-27 10:47:01 -07:00
misc vmw_balloon: Fix offline page marking with compaction 2019-08-28 22:57:07 +02:00
mmc mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing 2019-08-30 09:17:53 +02:00
mtd mtd: hyperbus: fix dependency and build error 2019-08-29 14:31:23 +02:00
mux
net ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet 2019-09-12 17:53:02 +03:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
oprofile
parisc
parport
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 14:23:31 -07:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 14:23:31 -07:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 14:23:31 -07:00
sfi
sh
siox
slimbus
sn
soc soc: ixp4xx: Protect IXP4xx SoC drivers by ARCH_IXP4XX || COMPILE_TEST 2019-08-29 17:34:38 +02:00
soundwire
spi
spmi
ssb
staging
target Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 14:23:31 -07:00
tc
tee
thermal
thunderbolt
tty
uio
usb USB: cdc-wdm: fix race between write and disconnect due to flag abuse 2019-08-28 22:48:38 +02:00
uwb
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile