[PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()

Subsystems: networking [general], sctp protocol, the rest

STALE2380d

Revision v1 of 4 in this series.

2 messages, 2 authors, 2020-02-24 · open the first message on its own page

[PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()

From: Jules Irenge <hidden>
Date: 2020-02-23 23:18:11

Sparse reports a warning at sctp_transport_walk_stop()

warning: context imbalance in sctp_transport_walk_stop
	- wrong count at exit

The root cause is the missing annotation at sctp_transport_walk_stop()
Add the missing __releases(RCU) annotation

Signed-off-by: Jules Irenge <redacted>
---
 net/sctp/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 05be67bb0474..fed26a1e9518 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5340,7 +5340,7 @@ void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
 	rhashtable_walk_start(iter);
 }
 
-void sctp_transport_walk_stop(struct rhashtable_iter *iter)
+void sctp_transport_walk_stop(struct rhashtable_iter *iter) __releases(RCU)
 {
 	rhashtable_walk_stop(iter);
 	rhashtable_walk_exit(iter);
-- 
2.24.1

Re: [PATCH 06/30] sctp: Add missing annotation for sctp_transport_walk_stop()

From: David Miller <davem@davemloft.net>
Date: 2020-02-24 21:28:57

From: Jules Irenge <redacted>
Date: Sun, 23 Feb 2020 23:16:47 +0000
Sparse reports a warning at sctp_transport_walk_stop()

warning: context imbalance in sctp_transport_walk_stop
	- wrong count at exit

The root cause is the missing annotation at sctp_transport_walk_stop()
Add the missing __releases(RCU) annotation

Signed-off-by: Jules Irenge <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help