summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Rose <gvrose8192@gmail.com>2018-07-19 18:48:31 -0700
committerBen Pfaff <blp@ovn.org>2018-07-27 11:38:20 -0700
commita599bcebd76596def309f6ca5311913d1036c698 (patch)
tree469725023d7b65cb82cd89d25aa76a23d9a83740
parenta8201b144ca8dd830ee05f19c8591e15a204f275 (diff)
downloadopenvswitch-a599bcebd76596def309f6ca5311913d1036c698.tar.gz
compat: Initialize IPv4 reassembly secret timer
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>
-rw-r--r--datapath/linux/compat/ip_fragment.c3
-rw-r--r--datapath/linux/compat/nf_conntrack_reasm.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c
index cf2daaa5a..e6d38f13c 100644
--- a/datapath/linux/compat/ip_fragment.c
+++ b/datapath/linux/compat/ip_fragment.c
@@ -734,6 +734,9 @@ int __init rpl_ipfrag_init(void)
#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");
return -ENOMEM;
diff --git a/datapath/linux/compat/nf_conntrack_reasm.c b/datapath/linux/compat/nf_conntrack_reasm.c
index ef29115b6..78e4aa2c6 100644
--- a/datapath/linux/compat/nf_conntrack_reasm.c
+++ b/datapath/linux/compat/nf_conntrack_reasm.c
@@ -634,6 +634,9 @@ int rpl_nf_ct_frag6_init(void)
#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)
goto out;