Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2166578ybv; Fri, 14 Feb 2020 12:49:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyw3UNuGTXx04W4TGbSOMM3KsWAziilj/ahRXpKPIgpcGR6psgoZmzLaQrQczG/jh1RJnhf X-Received: by 2002:a05:6808:289:: with SMTP id z9mr3066259oic.48.1581713392915; Fri, 14 Feb 2020 12:49:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713392; cv=none; d=google.com; s=arc-20160816; b=tnzm3qlZhTjZR7Yxhzptk3+mbmyK63IKvvjbtDYZZjyhwUlZK3aKpdDWzpALaDGT0i 435jjSIctdSkelan/ovaq/C9wlK7sE/UyasrUFeuV/PZ0th86aBvUpqoQ6jTuTtw5tk6 tQ4iwBke0MW8UXXTbtXYevBCTUzyN+Qx9NyV574iiMPZaKTdqVIEmNau/Kv7RgCeOiPb Sl8iy0sk+6+UUykuySSY/KsYvR/lqJzFl+tWAflBmxWDnjRaSyPBNf04tLswUkzh7btl e1AwgqavOqAA6Arf/4M0VedvSqlyq+RieqvK1aHBz3ckbT9muE3K8zOW+Wf7TnqumC7Y aPmQ== 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=zokGFmAQnm/AR6cG+S2XrobvXP1EFlLQZdpuCKio4jQ=; b=JLL+dx+zhUJ3DUvaPC9PDN1in6OVyIgHanxdypeIY7iHMiIW406YiQkyezbGF1y3at QLmD/KiXIAZJ9SJHfBKLObMGvjoLEaBrlpww4h9kDitnifRGPJLZ0w0nziYkLkn5xNXD XTqLgz0otEeRuPu2yUNOZYnzx3bOGj7DFJeVCm1tU+H+9k8TuZO5ja0kjqy2bj99Z73C VUHjlfXlwQdMcmNncLuX95y84Qirfp94mI2xwLPGGoprVOOol9bzEpMSuaBYCWOddRUV M4/edZAXuc4YpvCcQ7GSr+XmLkf2xy5SM6JXeDdx9jv3YNwC0Cv3rpHrwUjUdVXsPC/C TkcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lw4tti9x; 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 a3si3660909oib.168.2020.02.14.12.49.40; Fri, 14 Feb 2020 12:49:52 -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=Lw4tti9x; 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 S2389395AbgBNUtN (ORCPT + 99 others); Fri, 14 Feb 2020 15:49:13 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34676 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389261AbgBNUtM (ORCPT ); Fri, 14 Feb 2020 15:49:12 -0500 Received: by mail-wr1-f66.google.com with SMTP id n10so10520928wrm.1; Fri, 14 Feb 2020 12:49:10 -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=zokGFmAQnm/AR6cG+S2XrobvXP1EFlLQZdpuCKio4jQ=; b=Lw4tti9xRk8JkoGG5TkFM+3GVDA+Hs/nJVQ0QLEq6GNCHfOgD/m+pdKocFQ9N9JPs1 cDzD2ViHTBbAYiJ6mUJMzeYdfQLeKulhWIzulJ6Si5ifzKDE0AT9E9S56PwqH2hPbsOO 7qd4Z1ZC/vClCtHAv5YxP69YbyngFpkeNphiUKi5ped/4i1KY/TOGnhgBAebfH8NKMkK Mxye4gCG5hDoB08qUIYIONrP+ndkN8pfe6dZuhx6AU8k5O5bttu5JBxiBRtElTi606Wy tTp+ZfxIuP8v4sz16wHfh5j1hZzZQp0TVRPlKkaL0tOUCTsOeVn7RiyivE+tHyoIy3Z4 G94Q== 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=zokGFmAQnm/AR6cG+S2XrobvXP1EFlLQZdpuCKio4jQ=; b=LWOVd7GlYSxxqM0icyzp1FVLq4X1pw58TY1aSx3nhlNTOzlX2nwutNTNc2pBkHTVrD OkOK0zWGoEVyrXktlFEEsvbYuWQksj04EeMQefvEGYd+mZCzpih68RP4990/9XpYre9r dY5MHlM1udzzIJNFh5MC5UyYZMDCVu0fIpZ6/Iu5Evr4qsvGpKoIGOaE4Y6E5bL9o+ib JDdurl30TLQBCbGcDVhliITplVxXFOu31Y9nUMyQWWzRXl5z2OFHak6Q68l4ilUQfSFC JxLX6bz7mP2BYG7uWBl3yzWVy6JurPCfkMe3Nb0d8uOXTf9CcC6F0yiAL1onOs6IO/aI R9pQ== X-Gm-Message-State: APjAAAUmZbX1vEFAUu8bTUrdCo3jZAbxReW+aKQFypgHq7vJWm56UjE2 RoYO4W3PWlQtTDkKZHmHHwdUaA/KRpDn X-Received: by 2002:adf:f103:: with SMTP id r3mr5807536wro.295.1581713349761; Fri, 14 Feb 2020 12:49:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:49:09 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , "David S. Miller" , Jakub Kicinski , Taehee Yoo , Johannes Berg , Tetsuo Handa , Thomas Gleixner , Patrick Talbert , Herbert Xu , Li RongQing , netdev@vger.kernel.org (open list:NETWORKING [GENERAL]) Subject: [PATCH 30/30] net: Add missing annotation for netlink_walk_stop() Date: Fri, 14 Feb 2020 20:47:41 +0000 Message-Id: <20200214204741.94112-31-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_stop() warning: context imbalance in netlink_walk_stop() - unexpected unlock The root cause is the missing annotation at netlink_walk_stop() A close look at rhashtable_walk_stop() shows that an __releases(RCU) is needed here Add the missing __releases(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 a3fddc845538..7a287dc73f63 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2545,7 +2545,7 @@ static void netlink_walk_start(struct nl_seq_iter *iter) __acquires(RCU) rhashtable_walk_start(&iter->hti); } -static void netlink_walk_stop(struct nl_seq_iter *iter) +static void netlink_walk_stop(struct nl_seq_iter *iter) __releases(RCU) { rhashtable_walk_stop(&iter->hti); rhashtable_walk_exit(&iter->hti); -- 2.24.1