Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp1073947imc; Sun, 17 Mar 2019 03:14:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsM/MAX/dyorbHl1mtDWtASqFsToyPYTQCZEQk3bAieMfalOEvCfJSozpK9d4NLtdF9Wui X-Received: by 2002:a17:902:6b05:: with SMTP id o5mr13971308plk.90.1552817678401; Sun, 17 Mar 2019 03:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552817678; cv=none; d=google.com; s=arc-20160816; b=v3XCCAP/dIvhPereuKD3jO+cfv2T+okszcNMizgZWJ+hxY8SCBfheObf49GA7C6uCM v6J8eAdSMG64Grt02865vzdSLEtGPnONmezELFYxTz/qoZly22kW68dOpcJqoIejdUI4 FoiXi9bvjxvKrsgeydhnHn+S9VNdH3CrLJPpb2yccOPSy7ZttMciI6fNki39m+O3tdpC Bwj8Y27B1rCaxdAOFEs8OhUiFb6wgDha9khUadgDI0byRwFNqtWJhOT+G93bSOky0RI2 rup90Z7SfUq1OQ8nq31FoDAo5XUJhkandm24daqpvFaWth2Y2eHnRzAfBHO/X+YWvUN+ sUjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=147B9T/91XGMrnpBE/A4WLNXccBeRvSAaEzXxSTtRAo=; b=wFK4MO/nCY8Vsf6byVmXR6Cse1yAInaOT4Xv7qNsp/+Y7lmpMxLnzp6FyLCQAGMzK1 e5UyzTRFlGcORHEeKAquB7M/xgpWFJQjWksvmmEOaTQzF3MsJfMc0S1AGn010pakrQOp PbjMt/4AJ8xGshNVCJ2Xej3WgotpsQoZYb1hlzpi5ICHO906a6+61pEmMt3HrY4Fc3EL LlY2FbKR4UVQz5uLW2zynIUk2Z6WMYLNWUHHmlcAoMyzm9MNCReHcv1eSFBF4LdwlsRT weju2P+LFjDn6WiziWYFBapwq2pz6+ndSCzqbuUdRExK0IgXdMxBk4mm+D5iezyseGXc Axdg== 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 x14si6377628plr.259.2019.03.17.03.14.22; Sun, 17 Mar 2019 03:14:38 -0700 (PDT) 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 S1727040AbfCQKNq (ORCPT + 99 others); Sun, 17 Mar 2019 06:13:46 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:58304 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbfCQKNq (ORCPT ); Sun, 17 Mar 2019 06:13:46 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id B104B20257; Sun, 17 Mar 2019 11:13:44 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CDrnVdk8PZRg; Sun, 17 Mar 2019 11:13:39 +0100 (CET) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 66817201C1; Sun, 17 Mar 2019 11:13:39 +0100 (CET) Received: from gauss2.secunet.de (10.182.7.193) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server id 14.3.439.0; Sun, 17 Mar 2019 11:13:39 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 0B1BE318060C; Sun, 17 Mar 2019 11:13:39 +0100 (CET) Date: Sun, 17 Mar 2019 11:13:39 +0100 From: Steffen Klassert To: Herbert Xu CC: Su Yanjun , , , , , , Eric Dumazet Subject: Re: [PATCH] xfrm6_tunnel: Fix potential panic when unloading xfrm6_tunnel module Message-ID: <20190317101338.GQ6035@gauss3.secunet.de> References: <1552546782-102587-1-git-send-email-suyj.fnst@cn.fujitsu.com> <20190315062438.id3664ccow5uxgvt@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190315062438.id3664ccow5uxgvt@gondor.apana.org.au> User-Agent: Mutt/1.9.4 (2018-02-28) X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 881F5785-CE43-43DA-B585-DD0F32861033 X-G-Data-MailSecurity-for-Exchange-ProcessedOnRouted: True Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 02:24:38PM +0800, Herbert Xu wrote: > On Thu, Mar 14, 2019 at 02:59:42PM +0800, Su Yanjun wrote: > > When unloading xfrm6_tunnel module, xfrm6_tunnel_fini directly > > frees the xfrm6_tunnel_spi_kmem. Maybe someone has gotten the > > xfrm6_tunnel_spi, so need to wait it. > > > > Fixes: 91cc3bb0b04ff("xfrm6_tunnel: RCU conversion") > > Signed-off-by: Su Yanjun > > --- > > net/ipv6/xfrm6_tunnel.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > This looks good to me. And it's not just the matter of accessing > freed memory. A worse problem would be trying to execute code > from an unloaded module. > > Acked-by: Herbert Xu Applied, thanks everyone!