Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp305398imb; Fri, 1 Mar 2019 00:49:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IZfKHtQ0wRM/D5KdRZaL0chhaHpGVT8OM0AHPAez77N4uVETAE/ATjfIEL94gihgUDzbk4O X-Received: by 2002:a62:6f06:: with SMTP id k6mr4327332pfc.257.1551430182479; Fri, 01 Mar 2019 00:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551430182; cv=none; d=google.com; s=arc-20160816; b=q/UedNByaaTxVlzEJN5qf4Y423JiOGuaMxnrAOiquLSenjJoxeBM0Ysll7excdGbHc 9qXqLTQHK8NwWNisa2kTgKFhDJIoo8WjsI/Ot+1rTvZhuTaxB/I2J693gs1O5AoXCm2A QBxMN++WduT6KYKffJbl4KZZCLcyIJT94kaErsP52BTmxdxkebsdcPucpRCI4MICpPW7 ujJQ2tCvdfjiXFfozsne1ixLocqHAgAvX6r+mrMn0HViKXW8Qla9ZqyIhu3n8610wvrz oK4U/HAFthSHCgqaAbcPvLrHkhwxgD1TZItgINQSCiYU//YYFiImWaPNGUKp55LyQoXj gUTg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=dHgrxAerKH54EZRV7lKiut97ONmA2OZmvWj2BlwqLOY=; b=Boa4nSCeMB+Lb2yqOh3ccHfCxLwEuu2m5u+f+WiArq6aPAxDReTgy0+ICx+EUcegQR 5VjlxGMHEgbjcFI3+4JYzkTrIvLfLLYK6pKU33ZohxbR4wyN3bKsrVuhlOC7VFLcSdGP u25BAu5/jwObeWW1Tx9Uz+IATWejppLIA5NRIenOw89mpW0eLBXKzPWmJm7VRxl1bxuj ojkCFVBWBwuHOvJJKK9ENZxnOmurlpirhQ4j8yJ/AfxtgLzY5gd7VkUpj9eFRSM+UXI6 l6VatKPkEC7hW0f03GtMuB4MmvnJ9dOykGqH6kMXEqWJ0NkScS0veIu3+p4ZirGZgGAu ki2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=XKVl5KlS; 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 x13si20051923pge.375.2019.03.01.00.49.26; Fri, 01 Mar 2019 00:49:42 -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; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=XKVl5KlS; 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 S1733007AbfCAIn6 (ORCPT + 99 others); Fri, 1 Mar 2019 03:43:58 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39760 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbfCAIn5 (ORCPT ); Fri, 1 Mar 2019 03:43:57 -0500 Received: by mail-lj1-f194.google.com with SMTP id g80so19658254ljg.6 for ; Fri, 01 Mar 2019 00:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dHgrxAerKH54EZRV7lKiut97ONmA2OZmvWj2BlwqLOY=; b=XKVl5KlSMJdjz3CJzWWeLj4dzdU4PtQR3/sfXrzoeTK8wBSGK+ksybq+laZTGF2KhH khrHg7ldJmB451J1av30w2FMnjo7+3EOtgkMFVrvwg8SNMFkbsgZdnbsYCZRsUDAyddP CUC37IoSuZWUPcPiwvCWiECqRn38c/URe5/8NagxZfiDiHag5lYeop5flUEzZ8zGjzl6 j0YLJkzCbJNqHJ3wwcsy5ZF+VnKftGSMgMT9JN3Nkft8l8xynp0bqxPEzMzq3IlkkR3V 0gCwwc7wvM0uxi83HjNBkQAuK9GWy5jGw9PUKglRioOieksQKOwv5PpQLywn+2M77hjQ b+1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dHgrxAerKH54EZRV7lKiut97ONmA2OZmvWj2BlwqLOY=; b=T7Vl0+LK39VN6oze3OlOLJubtcUFixAohXcf5+wYLSrWMmJ0OsZmgtqkJ1gmqiHuxt Hm6x+XyOzOHZA+4VNWmTXgyk562N7UOtFLBskZfKBL9Z63Ci4qris9EtgnSA3o5B3VZK OUFHYm5r+JVUI2N5Sn9f52n9cuw8fknYIpC28Td8vLvJKMYbVZ8h2MoCGqAe+47gG50d 8Tz34yhalQ/zQvbR/h+eKHuYlIHZMd9je4WuzwnNF/vHnFdBzSoyJ5gKtkA+lDtEDavX lu2crDUqAiNcIYEAk2aqkMBjkMpyQJQgO/i+JxX69eK7rdpd+pDoT3/DWiLZeMGiRdC9 sing== X-Gm-Message-State: APjAAAUnIXIFv3MXSMviJcSAhcNU/uldURxgYbaU0nZa2J+G3pHrNXVd cYX+Cde+Ifgm/iGY8NmXr5D5TA== X-Received: by 2002:a2e:9117:: with SMTP id m23mr1909761ljg.94.1551429835517; Fri, 01 Mar 2019 00:43:55 -0800 (PST) Received: from [192.168.0.199] ([31.173.84.89]) by smtp.gmail.com with ESMTPSA id a26sm1322361lfl.45.2019.03.01.00.43.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 00:43:54 -0800 (PST) Subject: Re: [PATCH] netfilter: nf_ct_helper: Fix possible panic when nf_conntrack_helper_unregister is used in an unloadable module To: Su Yanjun , pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: suyj.fnst@cn.fujitsu.com References: <1551419766-1039-1-git-send-email-suyanjun218@163.com> From: Sergei Shtylyov Message-ID: Date: Fri, 1 Mar 2019 11:43:43 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <1551419766-1039-1-git-send-email-suyanjun218@163.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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? > situation. > > Signed-off-by: Su Yanjun [...] MBR, Sergei