Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1468297img; Tue, 19 Mar 2019 08:16:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUXyKBc+fFgmvFLlklbOGS1+9JRS50ly4qsu5u9tJeGPGJlMiUhHlV3fP0aoSW0Lc2dqU9 X-Received: by 2002:aa7:83cb:: with SMTP id j11mr2893030pfn.117.1553008571591; Tue, 19 Mar 2019 08:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553008571; cv=none; d=google.com; s=arc-20160816; b=SjpN8QPOEoxlM/nkWmpaq75gqVyj8TSZ+vWXuBpXK5lyGyo8DY44bDvNZB1Zg3nPeH SkVVXJMX3JEClLrR5cs6DG3E3qdo5QW9nGsf14Q3L/a2UzrAMHWVibW9w264vzBLmj3v EEIzHkL80REdySiJonvK7oRTLm1MrrM/zGpqD7h0OLcCErIqyxHbrGI2rWKsevHegM4F t4yXallE6XDOlbTkWUsTC/UIdH8qt1VcISVp9QSqkX6E35oL5qqBB3I9cJk+1HNA+hiZ 0LmTfP3btrcE7ZYDWfrZ9Nd91u55CVM72yvH+AyKFqb3qiO0LN8SRGl2aHER1AgmgT4D pE7g== 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=R9HhJBT3VoZVpoOpEm+jNJJJRqtaPpQNQ6DatWPehlc=; b=mHN/rRP8rJJe/mCKNh0wj5h5N3QbV0wIRDEsCO2kY1yoqZru+CGrK905IXRr60xWiF mSZXy2Ju7ESfqIiohZBTjSQPXKEBq56GC35iWnu8VK+6APnB/f1Ck7I3/Tmy8G6w56hw 3snH21jKu0khjq5inq4dq1cjST0fz1wlGuHburjhSGCxG3PGz+jPIUM2yTQiHzil2+kD GGtQIQAkN+Cma17U7FXkjms81wY/04P6l65MgVzopG3+jY7+b0bcqQbRSZRdxyYnwfIJ ZCeIGrVJ5gbuo+H7i8rsG7cYSF6IAkJhaDTzNp8lk2IJXlpvjQsJiQR3QE4QUK8amNTx HHbA== 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 b37si9960792pla.155.2019.03.19.08.15.55; Tue, 19 Mar 2019 08:16:11 -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 S1727417AbfCSPPH (ORCPT + 99 others); Tue, 19 Mar 2019 11:15:07 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:48952 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbfCSPPG (ORCPT ); Tue, 19 Mar 2019 11:15:06 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id C144320250; Tue, 19 Mar 2019 16:15:04 +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 bGpM2X8kgHpE; Tue, 19 Mar 2019 16:15:04 +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 5F8942024F; Tue, 19 Mar 2019 16:15:04 +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; Tue, 19 Mar 2019 16:15:03 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 01A82318041E; Tue, 19 Mar 2019 16:15:03 +0100 (CET) Date: Tue, 19 Mar 2019 16:15:03 +0100 From: Steffen Klassert To: Eric Dumazet CC: Su Yanjun , , , , Subject: Re: [PATCH v3] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm Message-ID: <20190319151503.GW6035@gauss3.secunet.de> References: <1551923648-17656-1-git-send-email-suyj.fnst@cn.fujitsu.com> <20190311101006.GK3758@gauss3.secunet.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: 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: 5AFD50FB-37F6-4225-8465-5A6B9106DBFC 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 Mon, Mar 18, 2019 at 10:22:46AM -0700, Eric Dumazet wrote: > > > On 03/11/2019 03:10 AM, Steffen Klassert wrote: > > On Wed, Mar 06, 2019 at 08:54:08PM -0500, Su Yanjun wrote: > >> For rcu protected pointers, we'd better add '__rcu' for them. > >> > >> Once added '__rcu' tag for rcu protected pointer, the sparse tool reports > >> warnings. > >> > >> net/xfrm/xfrm_user.c:1198:39: sparse: expected struct sock *sk > >> net/xfrm/xfrm_user.c:1198:39: sparse: got struct sock [noderef] *nlsk > >> [...] > >> > >> So introduce a new wrapper function of nlmsg_unicast to handle type > >> conversions. > >> > >> This patch also fixes a direct access of a rcu protected socket. > >> > >> Fixes: be33690d8fcf("[XFRM]: Fix aevent related crash") > >> Signed-off-by: Su Yanjun > > > > Patch applied, thanks! > > > > Has this patch ever been tested ? I had this on your testing system and it did not complain. But maybe my testcases did not trigger that codepath. Su, can you answer on Eric question?