sctp: Add missing annotation for sctp_transport_walk_stop()
authorJules Irenge <jbi.octave@gmail.com>
Sun, 23 Feb 2020 23:16:47 +0000 (23:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 21:26:49 +0000 (13:26 -0800)
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 <jbi.octave@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c

index 05be67bb0474a8c820c50275b0933210e63e7de5..fed26a1e951870db80adc27618c9004c6be7ec55 100644 (file)
@@ -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);