Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp12889ybh; Tue, 10 Mar 2020 18:11:48 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvPCRnYQMmxYtwJd9SQ4Aqsai1zeJ1w7YRTah88CkbA0FiLvJI8jzqa1UWkNHfuiGO0FQ18 X-Received: by 2002:aca:1e07:: with SMTP id m7mr294013oic.41.1583889107862; Tue, 10 Mar 2020 18:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583889107; cv=none; d=google.com; s=arc-20160816; b=ARwULOMGkkvpLAOFn9dntrlfkg/PNQ5oHs7HnygwHQjW6HrlfEhiRf0WTfJtozAkYO WHin0d20Q5fBRN10UdksxWmMJJhX/n8W6rHA5uqWd6QUyekVFkiprhCkeesbLR079hG6 DkzAXmxX3cIdGyAjtb8cJ6Zq6JsebDmggVL0B3jSJ2e0QTGE6HxBKCaySxqYy8fJYg5S a5HfkBQuT9MjphQuKTtoHC6vuZuNi2dxEwBIMdmqTzoIsx1ssfrB07YhyJKAl6uhimQ2 qN3ZJ9wjXQF1a04rAhYkYBJi7s73HBuywsSE/k9hbUzZRoJO+JGcVVSRsQ/SkZxM+EwG ufLg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RuNOtjoIJ0PnueFmG34tyRMkYyJp/CS0kq/rmnLgTB8=; b=dLx7rsRrmScVxnbTNdqElY/h6mV898Pe3SBNIRH2Ly77eRnX+uGyqD5weraZzxB83M oZkNa16ensdT9nA+3oPz9Xr6vZmfpdtb7Xgn8gBQr4Qpn3NgiedERpwwvyX+zagVsAsb WE+wibiaDZEj2GXNbrEHAWHjSe+OoJvpVRtM/9/toEh7oM8fJdsWvkv+8IUBsguDaqlh AmIEtrDXqZ4ZXIpe1hJDm5v3fCoogQsb8eIycA0gG3Oxoj72ky0BTLQ0dpcIKSFmurAd I4h+ab9pKx14mUVca4T8Ld8A8MwkYRuYDPpAiZ/kypMYgtKgH14T0RWf/D5nSB2aIm4y XvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ky5RLIT1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si269226oic.222.2020.03.10.18.11.34; Tue, 10 Mar 2020 18:11:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ky5RLIT1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728057AbgCKBKA (ORCPT + 99 others); Tue, 10 Mar 2020 21:10:00 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54869 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbgCKBJc (ORCPT ); Tue, 10 Mar 2020 21:09:32 -0400 Received: by mail-wm1-f66.google.com with SMTP id n8so282065wmc.4; Tue, 10 Mar 2020 18:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RuNOtjoIJ0PnueFmG34tyRMkYyJp/CS0kq/rmnLgTB8=; b=Ky5RLIT1Z12v+Tdj/SdmCF8yw8/esVe5wN2flSN6DvbtJiYTMcBZoKa8hjbCs/bABz dVkGsVx54HA62EKm6qRRC6fj5KrntxmxmLoSmTDHVN972WG02Pen5xBHVFzQnuSfMU2V x7Ya3EYfSOe4yxQfIBFPKfL4TtTzK3JxbGNHDf6he0YAHSD8YflAJ7j1+cjS42ti1QRb aUFiKBScPT4iy9+l0qY0Kah97UmvwP2sMgs4R6pfzhZ8aERSdxLz2trLB6ly3ozvc3Ys RlX3d6Moqp6pUOvX0Dh9Ctbk0R84djgtsCwsk3uEB4yqGsJ2ngqQYVqf+YGxAxw7jXR8 Q1Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RuNOtjoIJ0PnueFmG34tyRMkYyJp/CS0kq/rmnLgTB8=; b=swWPofLKhMIXhvf4tAiemiRGNn+1gtteFsLdD+xLtE13653MYqVC4wf+ZbLjPV37gu ztVvSiWDfS4az4CqFtLJVUo/ohnSdKPbJSg1xP8VRnnhEzqstLiPNSIsFSDGqX0eDPPl Vd0uBIc/4KzBnI7E0A3GGCIYKdd6qVMW+lV3GZSXdRhxeoTDEYZ7QJ+pTFD17Td9ITl/ IrA+6XhZS1DWWyGTfl2R8YwbYHh2yKgkOHbbFS+fUYzGW2iQCquZf5z5m/OkdEdDm2rc /BCBOuUsXTly2mffbBqqwyg7mmw/R7wAk8QTKqiG+KsnKM0yKB7GuzARKKa2+6gob733 gQJw== X-Gm-Message-State: ANhLgQ0Qt8wIg/ec8tSusWzx1IiWdM1MnEf6cIFP85wrEKZyZqdELW6c 3oUBWQ7YoHodV46Tja8uHQ== X-Received: by 2002:a1c:1fc7:: with SMTP id f190mr441997wmf.2.1583888969521; Tue, 10 Mar 2020 18:09:29 -0700 (PDT) Received: from ninjahost.lan (host-2-102-15-144.as13285.net. [2.102.15.144]) by smtp.googlemail.com with ESMTPSA id i6sm36658097wra.42.2020.03.10.18.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 18:09:29 -0700 (PDT) From: Jules Irenge To: boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , netfilter-devel@vger.kernel.org (open list:NETFILTER), coreteam@netfilter.org (open list:NETFILTER) Subject: [PATCH 4/8] netfilter: Add missing annotation for ctnetlink_parse_nat_setup() Date: Wed, 11 Mar 2020 01:09:04 +0000 Message-Id: <20200311010908.42366-5-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200311010908.42366-1-jbi.octave@gmail.com> References: <0/8> <20200311010908.42366-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at ctnetlink_parse_nat_setup() warning: context imbalance in ctnetlink_parse_nat_setup() - unexpected unlock The root cause is the missing annotation at ctnetlink_parse_nat_setup() Add the missing __must_hold(RCU) annotation Signed-off-by: Jules Irenge --- net/netfilter/nf_conntrack_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 6a1c8f1f6171..eb190206cd12 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -1533,6 +1533,7 @@ static int ctnetlink_parse_nat_setup(struct nf_conn *ct, enum nf_nat_manip_type manip, const struct nlattr *attr) + __must_hold(RCU) { struct nf_nat_hook *nat_hook; int err; -- 2.24.1