Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp321193imb; Fri, 1 Mar 2019 01:20:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwEOJXgsJQOmbqODyY5Q0DCLfaDc9RnQh/46m+8OJoigZfM0X7Xr90XtGbU35UBOX9mvttm X-Received: by 2002:a62:e11a:: with SMTP id q26mr4479848pfh.187.1551432041479; Fri, 01 Mar 2019 01:20:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551432041; cv=none; d=google.com; s=arc-20160816; b=Kl/nc6mN5hkpkN4mURQIF4JjROuT13H7GLkGHSiLvMZIdwR8L08rxGw199OSDTr5jb NAgNRRiwb7nAfnLxtk6iRqIbxM18zPfR0IZ8OmK6o+P35M1UDxFqs5HAcMnm/xBCw3Dq k2aCOzcEORmfYPQkRHZkEJl/Q89Li8sSnf7xUXNknEw3w7/Pluj9pYoi3q9bPveYFc7H MKoRpltJI0y7LWtFq7b368sZGqBjba83kRnXONyVEMbeHPIhaX0NIQ65dmk51BnrIzhR l7EYkt1p7lwS/PoK/hsdwljXU5wQ2McyHDvEzq88mpHY+wvwBvzjMW+Hu7jHutXc7mp4 Vljg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=khrF1wnbq4z2z8Ry0mPy+jk12EH9/YXNsuBx8FwosZs=; b=V+CoARS3T0FOyYmgtWpAT9p5bRD0p0kgtGtAehXUYMzzyifxti+5l8QfHNzvWdz1Th 4zb8/vM3OFREd4nWwxmYaRDm8JMpyTDFpsC3RC/KjXXyOgbf2FN2EOPv9H5pfW3JzZcv BsxJjVs5m6f3DPNceqHCg+igeqHprFdaUWLwr/nToGp4eNhUmKE30SNOsArDPkVnOcKC FiZC9oIVa0gczva17nZXtnf6Raz8mUFwrZ3lpGCwLhSH//W/hlsElWF5FKxPjp26EMtx oqMf87XWbHMWqgzpDbbww6At1lWABRXfaIsgXS6Jq1TffqyVSKyJ+DH+FsX15bCIN6Zg D2hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b60si20498160plc.95.2019.03.01.01.20.25; Fri, 01 Mar 2019 01:20:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733137AbfCAJIe (ORCPT + 99 others); Fri, 1 Mar 2019 04:08:34 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:12498 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727951AbfCAJIb (ORCPT ); Fri, 1 Mar 2019 04:08:31 -0500 X-IronPort-AV: E=Sophos;i="5.58,427,1544457600"; d="scan'208";a="55605169" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Mar 2019 17:08:28 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 0FBCC4C4FFEA; Fri, 1 Mar 2019 17:08:14 +0800 (CST) Received: from [10.167.226.33] (10.167.226.33) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Mar 2019 17:08:26 +0800 Subject: Re: [PATCH] netfilter: nf_ct_helper: Fix possible panic when nf_conntrack_helper_unregister is used in an unloadable module To: Sergei Shtylyov , Su Yanjun , , , , , , , , References: <1551419766-1039-1-git-send-email-suyanjun218@163.com> From: "Su Yanjun " Message-ID: Date: Fri, 1 Mar 2019 17:08:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.226.33] X-yoursite-MailScanner-ID: 0FBCC4C4FFEA.A3A41 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: suyj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/3/1 16:43, Sergei Shtylyov wrote: > Hello! > > On 01.03.2019 8:56, Su Yanjun wrote: > >> From: Su Yanjun >> >> Because nf_conntrack_helper_unregister maybe used in an unloadable >> module, >> it uses 'synchronize_rcu' which may cause kernel panic. >> >> According to the artical: > >    Article? > I got it. >> RCU and Unloadable Modules >> https://lwn.net/Articles/217484/ >> >> When we have a heavy rcu callback load, then some of the callbacks >> might be >> deferred in order to allow other processing to proceed. >> sychnorize_rcu does >> not wait rcu callback complete and module may be unloaded before >> callback >> done. >> >> This patch uses rcu_barrier instead of synchronize_rcu will prevent this >                                                         ^ that/which > missed? > Yes. >> situation. >> >> Signed-off-by: Su Yanjun > [...] > > MBR, Sergei > > Thanks. Su