netrom: Add missing annotation for nr_info_start()
authorJules Irenge <jbi.octave@gmail.com>
Sun, 23 Feb 2020 23:16:49 +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 nr_info_start()
warning: context imbalance in nr_info_start() - wrong count at exit
The root cause is the missing annotation at nr_info_start()
Add the missing __acquires(&nr_list_lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netrom/af_netrom.c

index 58d5373c513c7999bd73813eafd80c8abad87dc4..8be06e61ff0392985014a7c985741c4c3703e54c 100644 (file)
@@ -1230,6 +1230,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 #ifdef CONFIG_PROC_FS
 
 static void *nr_info_start(struct seq_file *seq, loff_t *pos)
+       __acquires(&nr_list_lock)
 {
        spin_lock_bh(&nr_list_lock);
        return seq_hlist_start_head(&nr_list, *pos);