tcp: Add missing annotation for tcp_child_process()
authorJules Irenge <jbi.octave@gmail.com>
Wed, 11 Mar 2020 01:09:03 +0000 (01:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 06:19:41 +0000 (23:19 -0700)
Sparse reports warning at tcp_child_process()
warning: context imbalance in tcp_child_process() - unexpected unlock
The root cause is the missing annotation at tcp_child_process()

Add the missing __releases(&((child)->sk_lock.slock)) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_minisocks.c

index c827437..03af7c3 100644 (file)
@@ -819,6 +819,7 @@ EXPORT_SYMBOL(tcp_check_req);
 
 int tcp_child_process(struct sock *parent, struct sock *child,
                      struct sk_buff *skb)
+       __releases(&((child)->sk_lock.slock))
 {
        int ret = 0;
        int state = child->sk_state;