[30/30] net: Add missing annotation for netlink_walk_stop()
diff mbox series

Message ID 20200214204741.94112-31-jbi.octave@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show
Series
  • Untitled series #158661
Related show

Commit Message

Jules Irenge Feb. 14, 2020, 8:47 p.m. UTC
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@gmail.com>
---
 net/netlink/af_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

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);