openwrt/target/linux
HsiuWen Yen ac04be82c4 netfilter: fix crash in flow offload by adding netns support
Commit fcb41decf6 ("config: enable some useful features on
!SMALL_FLASH devices") enabled netns, which in turn lead to the crash in
the flow offload target.

When the flow offloading framework intends to delete a flow from the
hardware table, it is necessary to retrieve the namespace from
nf_flowtable->ft_net. However, no one ever wrote the namespace into
nf_flowtable->ft_net in advance. So the framework will mistakenly use a
NULL namespace to execute dev_get_by_index_rcu(net, ifindex), leading to
the kernel panic.

Ref: FS#2321
Fixes: fcb41decf6 ("config: enable some useful features on !SMALL_FLASH devices")
Tested-by: Simon Tretter <simon@mediaarchitectu.re>
Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
[merged patch into offload patch, fix for 4.19, SOB fix, commit subj/msg touches]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry-picked from commit d344591e72)
2019-09-26 10:22:13 +02:00
..
apm821xx treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
ar71xx kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
at91 at91:renaming subtraget legacy to sam9x 2019-05-30 12:12:57 +02:00
ath25 treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup 2019-09-16 05:57:08 +02:00
ath79 ath79: remove invalid uses of ath9k_patch_fw_mac_crc 2019-09-22 00:17:51 +02:00
bcm53xx bcm53xx: sysupgrade: support Luxul firmware format 2019-09-16 16:02:26 +02:00
brcm47xx brcm47xx: sysupgrade: fix device model detection 2019-09-26 06:53:16 +02:00
brcm63xx kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
brcm2708 kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
cns3xxx treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-09-07 14:31:16 +02:00
gemini kernel: bump 4.14 to 4.4.142 2019-09-11 09:57:28 +02:00
generic netfilter: fix crash in flow offload by adding netns support 2019-09-26 10:22:13 +02:00
imx6 treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup 2019-09-16 05:57:08 +02:00
ipq40xx ipq40xx: abort ar40xx probe on missing PHYs 2019-09-25 22:50:24 +02:00
ipq806x treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
kirkwood treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-09-07 14:31:16 +02:00
lantiq kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
layerscape kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
malta malta: Deactivate MIPS O32 and N32 support 2019-05-14 21:50:42 +02:00
mediatek kernel: bump 4.14 to 4.14.145 2019-09-20 15:52:25 +02:00
mpc85xx treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-09-07 14:31:16 +02:00
mvebu treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
octeontx kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
omap treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
oxnas kernel: bump 4.14 to 4.14.128 2019-06-20 15:50:00 +02:00
pistachio kernel: bump 4.14 to 4.14.91 2019-01-07 17:09:06 +01:00
ramips ramips: add factory image for NETGEAR R6220 2019-09-16 21:43:39 +02:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM 2019-05-11 17:15:41 +02:00
sunxi treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
tegra treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
uml kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
x86 treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
zynq zynq: make title consistent for all devices 2019-05-17 21:41:43 +02:00
Makefile