lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200214204741.94112-31-jbi.octave@gmail.com>
Date:   Fri, 14 Feb 2020 20:47:41 +0000
From:   Jules Irenge <jbi.octave@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     boqun.feng@...il.com, Jules Irenge <jbi.octave@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Taehee Yoo <ap420073@...il.com>,
        Johannes Berg <johannes.berg@...el.com>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Thomas Gleixner <tglx@...utronix.de>,
        Patrick Talbert <ptalbert@...hat.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Li RongQing <lirongqing@...du.com>,
        netdev@...r.kernel.org (open list:NETWORKING [GENERAL])
Subject: [PATCH 30/30] net: Add missing annotation for netlink_walk_stop()

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 <jbi.octave@...il.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ