Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4106770imb; Wed, 6 Mar 2019 05:34:06 -0800 (PST) X-Google-Smtp-Source: APXvYqzKIcWemco+2xMpxXTuqYdyAustRn15Suqor279r3E2hfJEMZKzGlEnMjNq+kUpqToSVh5b X-Received: by 2002:a63:e101:: with SMTP id z1mr6392127pgh.190.1551879246157; Wed, 06 Mar 2019 05:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551879246; cv=none; d=google.com; s=arc-20160816; b=hWa8q/INFS3aBipMG0OyrgD+TfSjK4b5VLvJt1smDyqKLssAnUwScwbyXekH/qCuKn k91vvjx8f7SeH4sbi6+Js7t2n5ZJomf8ARj8YQLswmihEj/Kgs4SD48jESslLKbUEBaP nnebEHPeiZoVq+5x7gmG7gwDIzz6XViQO0CjXkXQ9o8Lx7ljBd7fekBrFyC5YQ54QVmR mZ104Jiw+G7FTYFiV+7xfHL/wG1KmW96hOnC3RFbp76KmL3gyFyOSN4oy9zzniMnvtWU e+OLF5oyHxJpjSJ4ajnNSCq6obiDZK+HC9C1qbhA3nvmTAMai09rtybgU+NQ+mhs8hPH xu7w== 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=XVqt4jdxoLxWXoMqzEJd0p/iKsfOoUoUXtlCOJ3g5SU=; b=slu/3IF1/fsnyATnR5W3VVnW8c7rB2fkXH05FfJxAVLQYw81x8siNXy35n5SUrORZO z1RPBWCP7l3xeGFEMjlx5V02FppjeMSZRfBotsZB5nU/KG8yW/cx+B9OZsFN1eHNSkc4 ei11CqA1ypHLIS1g4hqeJl8ranX10/M6BVId/spV3Br+yK7wZN4tNSwT6pe1wkTGRfQT b8CXTBcUyuVuKgmwbZbJrNpXwwq0Yf2NBO7n6L2FeF5LuMdQhOFV1M2maBU79Nx0VtWD reEHjO9geFW3QrvjOzor9wiRkGU+2l36a5u5f64xgnpBf1K+5Ozsflhk7pnZhE3GE+tA zh4Q== 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 j9si1393313pgq.317.2019.03.06.05.33.51; Wed, 06 Mar 2019 05:34:06 -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 S1729219AbfCFLd5 (ORCPT + 99 others); Wed, 6 Mar 2019 06:33:57 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:43510 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfCFLd4 (ORCPT ); Wed, 6 Mar 2019 06:33:56 -0500 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 953A420184; Wed, 6 Mar 2019 12:33:54 +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 ZQg6QigyqBCq; Wed, 6 Mar 2019 12:33:54 +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 41E152007E; Wed, 6 Mar 2019 12:33:54 +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; Wed, 6 Mar 2019 12:33:53 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 8F593318273F; Wed, 6 Mar 2019 12:33:53 +0100 (CET) Date: Wed, 6 Mar 2019 12:33:53 +0100 From: Steffen Klassert To: Su Yanjun CC: , , , Subject: Re: [PATCH v2] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm Message-ID: <20190306113353.GC3758@gauss3.secunet.de> References: <1551748754-16895-1-git-send-email-suyj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1551748754-16895-1-git-send-email-suyj.fnst@cn.fujitsu.com> 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: 464EDDEC-A539-47D1-A38B-B7532755C714 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 04, 2019 at 08:19:14PM -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. > > No functional change. While that was true for v1 of that patch, it is not true for this version. This fixes a direct access of a rcu protected socket. So please add a proper 'Fixes' tag.