kernel: nf_conntrack_rtcache: fix WARNING on rmmod
authorYousong Zhou <yszhou4tech@gmail.com>
Sat, 23 Nov 2019 18:05:45 +0000 (18:05 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Sat, 23 Nov 2019 18:07:14 +0000 (18:07 +0000)
Fixes b7c58a1ee ("kernel: nf_conntrack_rtcache: fix cleanup on netns
delete and rmmod")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
target/linux/generic/backport-4.19/020-backport_netfilter_rtcache.patch

index 37fd203d507357ad1fc6e647e07d48a3a7134b62..88e5386c1f4a1f05e88c40ae72d3dd87552e2083 100644 (file)
@@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
  # netlink interface for nf_conntrack
 --- /dev/null
 +++ b/net/netfilter/nf_conntrack_rtcache.c
-@@ -0,0 +1,430 @@
+@@ -0,0 +1,428 @@
 +/* route cache for netfilter.
 + *
 + * (C) 2014 Red Hat GmbH
@@ -528,8 +528,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
 +
 +      unregister_netdevice_notifier(&nf_rtcache_notifier);
 +      unregister_pernet_subsys(&rtcache_ops_net_ops);
-+      for_each_net(net)
-+              nf_unregister_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
 +
 +      synchronize_net();
 +
index b4ea1bcacbedba4627c0947553756465d4d9035d..c02b8f39e01bad534ba1960390310f6a2fdb0d31 100644 (file)
@@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
  # netlink interface for nf_conntrack
 --- /dev/null
 +++ b/net/netfilter/nf_conntrack_rtcache.c
-@@ -0,0 +1,430 @@
+@@ -0,0 +1,428 @@
 +/* route cache for netfilter.
 + *
 + * (C) 2014 Red Hat GmbH
@@ -528,8 +528,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
 +
 +      unregister_netdevice_notifier(&nf_rtcache_notifier);
 +      unregister_pernet_subsys(&rtcache_ops_net_ops);
-+      for_each_net(net)
-+              nf_unregister_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
 +
 +      synchronize_net();
 +