Skip to content

Commit

Permalink
af_unix: Add missing annotation for unix_wait_for_peer()
Browse files Browse the repository at this point in the history
Sparse reports a warning unix_wait_for_peer()

warning: context imbalance in unix_wait_for_peer() - unexpected unlock

The root cause is the missing annotation at unix_wait_for_peer()
Add the missing annotation __releases(&unix_sk(other)->lock)

Signed-off-by: Jules Irenge <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
irenge authored and davem330 committed Feb 24, 2020
1 parent 3283ff2 commit 48851e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
}

static long unix_wait_for_peer(struct sock *other, long timeo)
__releases(&unix_sk(other)->lock)
{
struct unix_sock *u = unix_sk(other);
int sched;
Expand Down

0 comments on commit 48851e9

Please sign in to comment.