> From: Jerome Mohm <[email protected]> > > vsock_bpf_recvmsg() takes lock_sock(sk) and holds it across the receive > loop, including vsock_msg_wait_data(), which slept in wait_woken() without > dropping the lock. When data arrived the transport's delivery context (the > vsock-loopback worker, or the virtio/vhost rx path) called > virtio_transport_recv_pkt() -> lock_sock() on the same socket and blocked, > so neither side made progress and a blocking recv() hung; the hung-task > watchdog reported the delivery worker in D state. > > Dropping the socket lock around the wait is necessary but not sufficient: > vsock_msg_wait_data() also did not loop and checked too few conditions, > which left three further problems in the same helper. > > - It did not loop. Once the lock is dropped, a wakeup that is not for new > [ ... ] > > Fixes: 634f1a7110b4 ("vsock: support sockmap") > Cc: [email protected] > Assisted-by: LLM > Signed-off-by: Jerome Mohm <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
