In method __unix_dgram_recvmsg, the lock u->iolock is not released when skb is true and loop breaks.
Signed-off-by: Ryan Cai <ycaibb@xxxxxxxxx>
---
net/unix/af_unix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index b0bfc78e421c..b97972948d9d 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2305,6 +2305,7 @@ int __unix_dgram_recvmsg(struct sock *sk, struct msghdr *msg, size_t size,
if (skb) {
if (!(flags & MSG_PEEK))
scm_stat_del(sk, skb);
+ mutex_unlock(&u->iolock);
break;
}