soreceive() must not hold mutex when calling sblock().
authorbluhm <bluhm@openbsd.org>
Tue, 19 Dec 2023 01:11:21 +0000 (01:11 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 19 Dec 2023 01:11:21 +0000 (01:11 +0000)
commit540e94b5c59ad30b9f4865467a9042622e45fb54
treea73df4a1e99616f93585635138f3858121211505
parent5134f2df90e8d8c2a0b44cbcc0198f2d07578c68
soreceive() must not hold mutex when calling sblock().

In my recent commit I missed that sblock() may sleep while soreceive()
holds the incpb mutex.  Call pru_lock() after sblock().

Reported-by: syzbot+f79c896ec019553655a0@syzkaller.appspotmail.com
Reported-by: syzbot+08b6f1102e429b2d4f84@syzkaller.appspotmail.com
OK mvs@
sys/kern/uipc_socket.c