Skip to content

Commit

Permalink
tcp: Add missing annotation for tcp_child_process()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jules Irenge authored and David S. Miller committed Mar 12, 2020
1 parent 0d8a42c commit 734c8f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/tcp_minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 734c8f7

Please sign in to comment.