kernel_optimize_test/drivers
Eric Dumazet 4179cb5a4c vxlan: test dev->flags & IFF_UP before calling netif_rx()
netif_rx() must be called under a strict contract.

At device dismantle phase, core networking clears IFF_UP
and flush_all_backlogs() is called after rcu grace period
to make sure no incoming packet might be in a cpu backlog
and still referencing the device.

Most drivers call netif_rx() from their interrupt handler,
and since the interrupts are disabled at device dismantle,
netif_rx() does not have to check dev->flags & IFF_UP

Virtual drivers do not have this guarantee, and must
therefore make the check themselves.

Otherwise we risk use-after-free and/or crashes.

Note this patch also fixes a small issue that came
with commit ce6502a8f9 ("vxlan: fix a use after free
in vxlan_encap_bypass"), since the dev->stats.rx_dropped
change was done on the wrong device.

Fixes: d342894c5d ("vxlan: virtual extensible lan")
Fixes: ce6502a8f9 ("vxlan: fix a use after free in vxlan_encap_bypass")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Petr Machata <petrm@mellanox.com>
Cc: Ido Schimmel <idosch@mellanox.com>
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-11 12:39:51 -08:00
..
accessibility
acpi
amba
android binderfs: remove separate device_initcall() 2019-02-01 15:50:26 +01:00
ata
atm
auxdisplay
base Driver core fixes for 5.0-rc6 2019-02-08 10:53:44 -08:00
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle cpuidle: poll_state: Fix default time limit 2019-01-30 22:57:42 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-01-31 23:09:00 -08:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware efi/arm64: Fix debugfs crash by adding a terminator for ptdump marker 2019-02-02 11:27:29 +01:00
fmc
fpga fpga: stratix10-soc: fix wrong of_node_put() in init function 2019-01-31 16:19:48 +01:00
fsi
gnss
gpio
gpu drm-misc-fixes for v5.0-rc6: 2019-02-08 10:32:49 +10:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide ide: ensure atapi sense request aren't preempted 2019-01-31 08:25:09 -07:00
idle
iio First set of IIO fixes for the 5.0 cycle. 2019-02-03 13:10:41 +01:00
infiniband
input Mostly driver fixes, but there's a core framework fix in here too. 2019-01-31 23:22:57 -08:00
iommu
ipack
irqchip xtensa fixes for v5.0-rc5 2019-02-01 16:56:30 -08:00
isdn mISDN: fix a race in dev_expire_timer() 2019-02-05 16:39:29 -08:00
leds
lightnvm
macintosh
mailbox
mcb
md dm: don't use bio_trim() afterall 2019-02-06 17:24:37 -05:00
media
memory
memstick
message
mfd
misc mic: vop: Fix crash on remove 2019-02-01 15:53:54 +01:00
mmc
mtd
mux
net vxlan: test dev->flags & IFF_UP before calling netif_rx() 2019-02-11 12:39:51 -08:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
oprofile
parisc
parport
pci pci-v5.0-fixes-3 2019-01-31 23:06:17 -08: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/davem/net 2019-02-08 11:21:54 -08:00
sbus
scsi SCSI fixes on 20190201 2019-02-02 10:12:53 -08:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging Staging/IIO driver fixes for 5.0-rc6 2019-02-08 10:51:59 -08:00
target
tc
tee
thermal
thunderbolt
tty TTY/Serial fixes for 5.0-rc6 2019-02-08 10:49:55 -08:00
uio
usb usb: typec: tcpm: Correct the PPS out_volt calculation 2019-01-31 09:14:00 +01:00
uwb
vfio
vhost
video
virt
virtio virtio: drop internal struct from UAPI 2019-02-05 15:29:48 -05:00
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile