]> git.proxmox.com Git - ovs.git/commitdiff
compat: Initialize IPv4 reassembly secret timer
authorGreg Rose <gvrose8192@gmail.com>
Fri, 20 Jul 2018 01:48:31 +0000 (18:48 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 27 Jul 2018 18:35:54 +0000 (11:35 -0700)
The RHEL 7 kernels expect the secret timer interval to be initialized
before calling the inet_frags_init() function.  By not initializing it
the inet_frags_secret_rebuild() function was running on every tick
rather than on the expected interval.  This caused occasional panics
from page faults when inet_frags_secret_rebuild() would try to rearm a
timer from the openvswitch kernel module which had just been removed.

Also remove the prior, and now unnecessary, work around.

VMware BZ 2094203

Fixes: 595e069a ("compat: Backport IPv4 reassembly.")
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
datapath/datapath.c
datapath/linux/compat/ip_fragment.c
datapath/linux/compat/nf_conntrack_reasm.c

index 43f0d74325931b6c7386e86489b4417a3096a353..3ea240adbfcf45312231dc855410e9376a927541 100644 (file)
@@ -2478,16 +2478,6 @@ error:
 
 static void dp_cleanup(void)
 {
-#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8,0)
-       /* On RHEL 7.x kernels we hit a kernel paging error without
-        * this barrier and subsequent hefty delay.  A process will
-        * attempt to access openvwitch memory after it has been
-        * unloaded.  Further debugging is needed on that but for
-        * now let's not let customer machines panic.
-        */
-       rcu_barrier();
-       msleep(3000);
-#endif
        dp_unregister_genl(ARRAY_SIZE(dp_genl_families));
        ovs_netdev_exit();
        unregister_netdevice_notifier(&ovs_dp_device_notifier);
index 8f2012b731ea6411f1c2a4dfb715293ef31544f4..f910b99b4d423aa3889f96254cf94105dc7dd601 100644 (file)
@@ -811,6 +811,9 @@ int __init rpl_ipfrag_init(void)
        ip4_frags.frag_expire = ip_expire;
 #ifdef HAVE_INET_FRAGS_WITH_FRAGS_WORK
        ip4_frags.frags_cache_name = ip_frag_cache_name;
+#endif
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8,0)
+       ip4_frags.secret_interval = 10 * 60 * HZ;
 #endif
        if (inet_frags_init(&ip4_frags)) {
                pr_warn("IP: failed to allocate ip4_frags cache\n");
index ea153c3c526f97a87fbfd461b5a45611cb5e33ea..ce13112fc42349445c24e52bb8ec1706c7570747 100644 (file)
@@ -642,6 +642,9 @@ int rpl_nf_ct_frag6_init(void)
        nf_frags.frag_expire = nf_ct_frag6_expire;
 #ifdef HAVE_INET_FRAGS_WITH_FRAGS_WORK
        nf_frags.frags_cache_name = nf_frags_cache_name;
+#endif
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8,0)
+       nf_frags.secret_interval = 10 * 60 * HZ;
 #endif
        ret = inet_frags_init(&nf_frags);
        if (ret)