lkml.org 
[lkml]   [2020]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/30] sctp: Add missing annotation for sctp_transport_walk_start()
    Date
    Sparse reports a warning at sctp_transport_walk_start()

    warning: context imbalance in sctp_transport_walk_start
    - wrong count at exit

    The root cause is the missing annotation at sctp_transport_walk_start()
    Add the missing __acquires(RCU) annotation

    Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
    ---
    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 1b56fc440606..05be67bb0474 100644
    --- a/net/sctp/socket.c
    +++ b/net/sctp/socket.c
    @@ -5333,7 +5333,7 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
    EXPORT_SYMBOL_GPL(sctp_get_sctp_info);

    /* use callback to avoid exporting the core structure */
    -void sctp_transport_walk_start(struct rhashtable_iter *iter)
    +void sctp_transport_walk_start(struct rhashtable_iter *iter) __acquires(RCU)
    {
    rhltable_walk_enter(&sctp_transport_hashtable, iter);

    --
    2.24.1
    \
     
     \ /
      Last update: 2020-02-24 00:20    [W:4.444 / U:1.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site