Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2167275ybv; Fri, 14 Feb 2020 12:50:48 -0800 (PST) X-Google-Smtp-Source: APXvYqy9IdTun3El92HX2GngDkv2Bjg9wpwXKNiygocw14GKMhFLYXH2WynTNWbYouzoDzWsxX6I X-Received: by 2002:a05:6830:13d9:: with SMTP id e25mr3701084otq.134.1581713448414; Fri, 14 Feb 2020 12:50:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713448; cv=none; d=google.com; s=arc-20160816; b=c569XFHRKVzlnN1XLNBAK22g+u1iwJFKpCutHiy0RcKtqsPMldktlNaj0TBIfEvXsM Bp7+u35FM67EJe67O3GTdxqwJ7yRRmBypoSlJaft6XUeEUGyxCzqyJxsYn7LbHtaaH1a cPw9edNXur5DrGxnd9VpNuKeu9+rxmuJu2+Q3FmzFuYW6vhS7ku/NzqIyQTA02oJmDoO rISub14HkvBcXWGjPfHAGIPD1LGkorn5RygBGcJJP90/hisQ5JLKVdeT56rJDFtnpXNT YT8v+yOvDnCwg+4xP+D+AlX2xesW8aDuWn+LE1M3mlunuv5Imw9rYf+Ak5IdojyWsftR MCPw== 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=PTi1iwWIZalb8+tOHd0befKZim7rmRMoPGjdQ/H1Q4s=; b=Uht/yqORyy6cnJHJ643DcJjQGHR5wVdmPQmuKXGpR2fsr/MmY9BXE60lKO3DoHIfGt NhRn8mJd/EiEsrcNUJ8st7Eg0+ZHI3Mi6WjOjP/r+eO2eWeUz9B24gXZ9x5eRhjuuvAL NiMd1S3Cr9VdOafPjtOd5+QqNUxDEVNkdCjK7qABuJ9UcQctG6oJFoudtTKCzyp7hZDH M94II3CYBi5zOn0MmMucz9CN/7PRq080iHLNeXhqSbGderMw6QrGhw1I5d60n2yVtOUa eXwyaZHp/KJV5Khz06MwT3SgSfMnOK86oGF/4ikUCXKeQIUQamifnvUtKrnH8OA60B9+ 0s2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aBz47RZs; 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 e9si2053944oib.207.2020.02.14.12.50.36; Fri, 14 Feb 2020 12:50:48 -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=@gmail.com header.s=20161025 header.b=aBz47RZs; 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 S2389465AbgBNUtV (ORCPT + 99 others); Fri, 14 Feb 2020 15:49:21 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35726 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389194AbgBNUtJ (ORCPT ); Fri, 14 Feb 2020 15:49:09 -0500 Received: by mail-wm1-f66.google.com with SMTP id b17so12169464wmb.0; Fri, 14 Feb 2020 12:49:08 -0800 (PST) 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=PTi1iwWIZalb8+tOHd0befKZim7rmRMoPGjdQ/H1Q4s=; b=aBz47RZsGbC65WLFj4UNgoX+CZnmJ+02b40cXyyAt5/0efODmVSzZReT1/cZZygB4S +Zw7120wmSpkRCNLq/u19JU/y1m1pUPmIGvluelBVso3C2afSC7Wv/Ys0C8sgkIS1uNE IAB1BTzTJETZMNm8FrLUaS1s3CHDsrhskPcHx215hkJqrwXPCI0Ar+1epSEnEOsiCWjR xvHbIQLvMvSwGKHJn6tjScl0HI7QVxO8toDjNuHYAGv6u4dDF4iQ46uTMyfQYqhem0uf nCB1H+UHnNtcdVI0lHuwBGtdkdlb9FS9fJKXiHOSklQGBPr4+Y76Ga+2Jqxd8WZT4iaN g0ZQ== 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=PTi1iwWIZalb8+tOHd0befKZim7rmRMoPGjdQ/H1Q4s=; b=HfdLDeNbJ1jYSyej3WztXkBv5MKFnNz0ysjmBSL9+d87vbUvRCQvit3Fr0S9JiKeZD fTKOQIR8BF2cX2D57coEoBEFMh4K8kBGtWcZDzKfhzrvu/vkuzIIoZ6WUNdBak9X4n6u 9XnWgRcMkq9/4uHdISS73GBCLqttmM2vjWQ9i7gp1U79kG6qt60Hd+XgF0SDnwzhlpgQ G1zj9sG9bXeQEMMdV71OlQV3to5OWP/8CT1rtmtZPHQpCccBwHq0SixGddfGj1vqjbnH aHR7i7YnPlra1wka4zR8tH3wiOv3aGm2xSiGuYyI6x+DY/wrxSf26O4FMTBox+y88qq1 CUyg== X-Gm-Message-State: APjAAAUiROv003qy3eyD5MF5GKKqdokEXdvCSsx8tv15SLgBkc7rGEb9 ig3d8EHknKKXpMpiubUSimsMa5WBMLgT X-Received: by 2002:a7b:c392:: with SMTP id s18mr6435207wmj.169.1581713346958; Fri, 14 Feb 2020 12:49:06 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:49:06 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , "David S. Miller" , Jakub Kicinski , Patrick Talbert , Herbert Xu , Greg Kroah-Hartman , Taehee Yoo , Tetsuo Handa , Li RongQing , Thomas Gleixner , netdev@vger.kernel.org (open list:NETWORKING [GENERAL]) Subject: [PATCH 29/30] net: Add missing annotation for netlink_walk_start() Date: Fri, 14 Feb 2020 20:47:40 +0000 Message-Id: <20200214204741.94112-30-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-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 netlink_walk_start() warning: context imbalance in netlink_walk_start() - wrong count at exit The root cause is the missing annotation at netlink_walk_start() A close look at rhashtable_walk_start_check() shows that an __acquires(RCU) is needed here. Add the missing __acquires(RCU) annotation Signed-off-by: Jules Irenge --- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 4e31721e7293..a3fddc845538 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2539,7 +2539,7 @@ struct nl_seq_iter { int link; }; -static void netlink_walk_start(struct nl_seq_iter *iter) +static void netlink_walk_start(struct nl_seq_iter *iter) __acquires(RCU) { rhashtable_walk_enter(&nl_table[iter->link].hash, &iter->hti); rhashtable_walk_start(&iter->hti); -- 2.24.1