HsiuWen Yen d344591e72 netfilter: fix crash in flow offload by adding netns support
Commit fcb41decf6c6 ("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: fcb41decf6c6 ("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>
2019-06-24 18:34:04 +02:00
..
2019-01-28 18:17:32 +01:00
2019-06-24 16:36:30 +02:00
2018-11-05 16:00:00 +01:00
2019-06-12 15:04:09 +02:00
2019-06-20 15:48:48 +02:00
2019-06-24 16:36:30 +02:00
2019-05-21 09:45:15 +02:00
2019-06-12 15:04:09 +02:00
2019-06-03 12:40:53 +02:00
2019-06-20 15:48:48 +02:00
2019-06-24 16:36:30 +02:00
2019-03-11 19:35:43 +01:00
2019-05-11 17:15:41 +02:00
2019-06-20 15:48:48 +02:00
2019-01-07 17:09:06 +01:00
2019-06-20 15:48:48 +02:00
2018-12-10 11:48:44 +01:00
2019-05-11 17:15:41 +02:00
2019-06-20 20:02:29 +02:00