linux-stable/drivers
Mahesh Bandewar e252536068 ipvlan: fix multicast processing
In an IPvlan setup when master is set in loopback mode e.g.

  ethtool -K eth0 set loopback on

  where eth0 is master device for IPvlan setup.

The failure is caused by the faulty logic that determines if the
packet is from TX-path vs. RX-path by just looking at the mac-
addresses on the packet while processing multicast packets.

In the loopback-mode where this crash was happening, the packets
that are sent out are reflected by the NIC and are processed on
the RX path, but mac-address check tricks into thinking this
packet is from TX path and falsely uses dev_forward_skb() to pass
packets to the slave (virtual) devices.

This patch records the path while queueing packets and eliminates
logic of looking at mac-addresses for the same decision.

------------[ cut here ]------------
kernel BUG at include/linux/skbuff.h:1737!
Call Trace:
 [<ffffffff921fbbc2>] dev_forward_skb+0x92/0xd0
 [<ffffffffc031ac65>] ipvlan_process_multicast+0x395/0x4c0 [ipvlan]
 [<ffffffffc031a9a7>] ? ipvlan_process_multicast+0xd7/0x4c0 [ipvlan]
 [<ffffffff91cdfea7>] ? process_one_work+0x147/0x660
 [<ffffffff91cdff09>] process_one_work+0x1a9/0x660
 [<ffffffff91cdfea7>] ? process_one_work+0x147/0x660
 [<ffffffff91ce086d>] worker_thread+0x11d/0x360
 [<ffffffff91ce0750>] ? rescuer_thread+0x350/0x350
 [<ffffffff91ce960b>] kthread+0xdb/0xe0
 [<ffffffff91c05c70>] ? _raw_spin_unlock_irq+0x30/0x50
 [<ffffffff91ce9530>] ? flush_kthread_worker+0xc0/0xc0
 [<ffffffff92348b7a>] ret_from_fork+0x9a/0xd0
 [<ffffffff91ce9530>] ? flush_kthread_worker+0xc0/0xc0

Fixes: ba35f8588f ("ipvlan: Defer multicast / broadcast processing to a work-queue")
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-23 17:53:47 -05:00
..
accessibility
acpi More ACPI updates for v4.10-rc1 2016-12-22 10:19:32 -08:00
amba
android
ata Merge branch 'for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2016-12-13 15:30:50 -08:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-06 21:33:19 -05:00
auxdisplay
base Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-22 09:25:45 -08:00
bcma
block A varied set of changes: 2016-12-16 11:23:34 -08:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-12-16 10:24:44 -08:00
bus ARM: SoC driver updates for v4.10 2016-12-15 16:03:25 -08:00
cdrom
char virtio, vhost: new device, fixes, speedups 2016-12-15 18:13:41 -08:00
clk Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-12-15 16:06:15 -08:00
clocksource ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
connector
cpufreq Merge branch 'pm-cpufreq' 2016-12-22 14:34:55 +01:00
cpuidle cpuidle: Add a kerneldoc comment to cpuidle_use_deepest_state() 2016-12-06 02:25:03 +01:00
crypto crypto: add virtio-crypto driver 2016-12-16 00:13:32 +02:00
dax libnvdimm for 4.10 2016-12-18 15:49:10 -08:00
dca
devfreq devfreq: rk3399_dmc: Don't use OPP structures outside of RCU locks 2016-12-08 01:46:07 +01:00
dio
dma dmaengine updates for 4.10-rc1 2016-12-14 20:42:45 -08:00
dma-buf
edac edac: fix kernel-doc tags at the drivers/edac_*.h 2016-12-15 08:58:10 -02:00
eisa
extcon sound updates for 4.10-rc1 2016-12-14 11:14:28 -08:00
firewire
firmware firmware: dmi_scan: Always show system identification string 2016-12-19 10:01:47 +01:00
fmc
fpga
gpio - New Device Support 2016-12-19 08:16:26 -08:00
gpu Merge tag 'drm-intel-next-fixes-2016-12-22' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes 2016-12-23 05:28:02 +10:00
hid Merge branches 'for-4.10/asus', 'for-4.10/cp2112', 'for-4.10/i2c-hid-nopower', 'for-4.10/intel-ish', 'for-4.10/mayflash', 'for-4.10/microsoft-surface-3', 'for-4.10/multitouch', 'for-4.10/sony', 'for-4.10/udraw-ps3', 'for-4.10/upstream' and 'for-4.10/wacom/generic' into for-linus 2016-12-14 10:12:26 +01:00
hsi
hv uio-hv-generic: new userspace i/o driver for VMBus 2016-12-06 11:52:49 +01:00
hwmon hwmon: (g762) Fix overflows and crash seen when writing limit attributes 2016-12-12 11:33:44 -08:00
hwspinlock
hwtracing This release has a few updates: 2016-12-15 13:49:34 -08:00
i2c i2c: mux: mlxcpld: fix i2c mux selection caching 2016-12-18 08:54:38 +01:00
ide
idle Power management material for v4.10-rc1 2016-12-13 10:41:53 -08:00
iio
infiniband First round of -rc fixes for 4.10 kernel 2016-12-23 10:38:48 -08:00
input - New Device Support 2016-12-19 08:16:26 -08:00
iommu More ACPI updates for v4.10-rc1 2016-12-22 10:19:32 -08:00
ipack
irqchip arm64 updates for 4.10: 2016-12-13 16:39:21 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-17 20:17:04 -08:00
leds
lguest
lightnvm Char/Misc driver patches for 4.10-rc1 2016-12-13 12:11:01 -08:00
macintosh
mailbox More ACPI updates for v4.10-rc1 2016-12-22 10:19:32 -08:00
mcb
md bcache: partition support: add 16 minors per bcacheN device 2016-12-17 13:02:00 -07:00
media media updates for v4.10-rc1 2016-12-16 09:39:16 -08:00
memory
memstick Merge branch 'for-4.10/block' of git://git.kernel.dk/linux-block 2016-12-13 10:19:16 -08:00
message SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
mfd - New Device Support 2016-12-19 08:16:26 -08:00
misc powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
mmc mmc: sd: Meet alignment requirements for raw_ssr DMA 2016-12-21 08:34:30 +01:00
mtd MTD updates for v4.10-rc1: 2016-12-17 16:41:10 -08:00
net ipvlan: fix multicast processing 2016-12-23 17:53:47 -05:00
nfc
ntb
nubus
nvdimm libnvdimm for 4.10 2016-12-18 15:49:10 -08:00
nvme nvme : Use correct scnprintf in cmb show 2016-12-19 08:35:24 -07:00
nvmem
of pci-v4.10-changes 2016-12-15 12:46:48 -08:00
oprofile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-12-17 18:44:00 -08:00
parisc
parport
pci powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
pcmcia drivers/pcmcia/m32r_pcc.c: check return from add_pcc_socket 2016-12-12 18:55:06 -08:00
perf
phy SCSI misc on 20161213 2016-12-14 10:49:33 -08:00
pinctrl ARM: DT updates for v4.10 2016-12-15 15:50:24 -08:00
platform platform-drivers-x86 for 4.10-2 2016-12-18 15:45:33 -08:00
pnp
power power supply and reset changes for the v4.10 series 2016-12-14 11:18:51 -08:00
powercap
pps
ps3
ptp Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
pwm pwm: Changes for v4.10-rc1 2016-12-15 11:45:13 -08:00
rapidio
ras
regulator - New Device Support 2016-12-19 08:16:26 -08:00
remoteproc remoteproc: qcom_adsp_pil: select qcom_scm 2016-12-09 16:16:56 -08:00
reset ARM: SoC driver updates for v4.10 2016-12-15 16:03:25 -08:00
rpmsg rpmsg updates for v4.10 2016-12-13 08:52:45 -08:00
rtc RTC for 4.10 2016-12-18 18:18:03 -08:00
s390 SCSI for-linus on 20161222 2016-12-23 10:36:19 -08:00
sbus
scsi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-12-23 10:52:43 -08:00
sfi
sh lib: radix-tree: check accounting of existing slot replacement users 2016-12-12 18:55:08 -08:00
sn
soc powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
spi dmaengine updates for 4.10-rc1 2016-12-14 20:42:45 -08:00
spmi
ssb
staging Merge uncontroversial parts of branch 'readlink' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs 2016-12-17 19:16:12 -08:00
target Merge branch 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux 2016-12-21 10:16:05 -08:00
tc
thermal Power management material for v4.10-rc1 2016-12-13 10:41:53 -08:00
thunderbolt Char/Misc driver patches for 4.10-rc1 2016-12-13 12:11:01 -08:00
tty dmaengine updates for 4.10-rc1 2016-12-14 20:42:45 -08:00
uio uio-hv-generic: store physical addresses instead of virtual 2016-12-10 14:57:58 +01:00
usb Merge branch 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux 2016-12-21 10:16:05 -08:00
uwb
vfio powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
vhost Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-12-16 10:24:44 -08:00
video xen: features and fixes for 4.10 rc0 2016-12-13 16:07:55 -08:00
virt
virtio virtio_mmio: Set dev.release() to avoid warning 2016-12-16 00:13:39 +02:00
vlynq
vme
w1
watchdog ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
xen mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
zorro
Kconfig
Makefile