From patchwork Fri Jul 20 01:48:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 946682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T0274KJd"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Wv1P61PYz9s3Z for ; Fri, 20 Jul 2018 11:48:40 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6905D89B; Fri, 20 Jul 2018 01:48:37 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 90801898 for ; Fri, 20 Jul 2018 01:48:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4887F466 for ; Fri, 20 Jul 2018 01:48:35 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id f1-v6so5355600pgq.12 for ; Thu, 19 Jul 2018 18:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dPbadPZ/NIsSxP1BMjidUUfn7webZljGRzNUXVw8kC0=; b=T0274KJd/Ljnw+nlYHXllYwFtO8/BQc/FyNEBN3Deyi16uQMT/hmtOf1muI2Pe/Hyj DGWV05+C/SCWilX7qySpymApR1uWb+mEHFewqR2hfKVjX1G3Fbl0Z7DBdU5sSd5pKWSg RDB17Xo07HWT8humFGuoV7pxVNl2KJoxKokSPE/Wg3Zb7AHB/pdYYK62wo27xSIf876A Etk4jesdYH9GT4IIckRXuaVotOAOsZmnjX2Seikp+1Y2eP4wDuNDPDfwRVpSvb5MIaPl 2X/10dPsEveYJRqY363w/7V7n0veDLyIh6Yc/TSW6U+OPebuhzHVdQ9W3aMFPt19zkjx 2Icg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dPbadPZ/NIsSxP1BMjidUUfn7webZljGRzNUXVw8kC0=; b=fwsb3bmqmvJ9iG1AYTQZM5ResoVt5zH3/ZvQ1pLosOtAKx+yF9CEPy/VMSgxqF+0of wzSqib9Qt2xqf0NHz+WPQw3xbwEqy2nFCVYxMFwWq/TH0Xen+aJDN69wJyXmoPlh6PAf AMIc75o85dJ9p+KINISz0u+h2rdFw4wm1ZcOoWA7p1blM9MmcFqqb3ZfrSN5VEKyiWTU iEOzWdUNg6nqKHG2zdOepGiYxAuVE3t/ptgFCRYVf9DPwj5PM9vqZkODkqnwnyWQKV9d 8mi9EbLZHZOMk8747vllY5xbt6ZV4YKb05+Y2QcAs03T+3TeDET6ZD1UQGtyE4I4GzTI g90g== X-Gm-Message-State: AOUpUlHwu/In2Jb8CaT6HYOQE4ih6eT1tVf0VEV1hLLGtdIs0u4DMNMe LxZobqSVKxvJwKEBGo2ygcaIK1SN X-Google-Smtp-Source: AAOMgpcdKu3GBO/vMj5se0WmayN6jMQdkwz2DM8MhYTwGU8MTIj3jT/KmqgTYKdkHkbp7vVwTTbBvA== X-Received: by 2002:a62:ec41:: with SMTP id k62-v6mr116347pfh.206.1532051314565; Thu, 19 Jul 2018 18:48:34 -0700 (PDT) Received: from gizo.domain (97-115-87-241.ptld.qwest.net. [97.115.87.241]) by smtp.gmail.com with ESMTPSA id e126-v6sm572679pfg.31.2018.07.19.18.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 18:48:34 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 19 Jul 2018 18:48:31 -0700 Message-Id: <1532051311-9749-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] compat: Initialize IPv4 reassembly secret timer X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Yi-Hung Wei --- datapath/datapath.c | 10 ---------- datapath/linux/compat/ip_fragment.c | 3 +++ datapath/linux/compat/nf_conntrack_reasm.c | 3 +++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 43f0d74..3ea240a 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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); diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c index 8f2012b..f910b99 100644 --- a/datapath/linux/compat/ip_fragment.c +++ b/datapath/linux/compat/ip_fragment.c @@ -812,6 +812,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 ea153c3..ce13112 100644 --- a/datapath/linux/compat/nf_conntrack_reasm.c +++ b/datapath/linux/compat/nf_conntrack_reasm.c @@ -643,6 +643,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;