> From: Jerome Mohm <[email protected]>
> 
> On a vsock socket in a sockmap, vsock_bpf_recvmsg() sends zero-length,
> MSG_OOB and MSG_ERRQUEUE reads down the sockmap path whenever the psock
> queue has data or nothing is queued at all. That path copies from the
> psock queue and waits for data, and it handles none of these reads:
> 
>  - a zero-length read with data in the psock queue spins with the
>    socket lock held, and the delivery worker blocks on that lock;
>  - MSG_ERRQUEUE consumes stream bytes from the psock queue, and the
>    zero-length MSG_ERRQUEUE read that MSG_ZEROCOPY users make to collect
>    completions gets -EAGAIN or blocks instead of reading the error
>    queue;
>  - MSG_OOB consumes ordinary stream bytes or waits for data, where a
>    connected native socket returns -EOPNOTSUPP.
> [ ... ]
> 
> Fixes: 634f1a7110b4 ("vsock: support sockmap")
> Suggested-by: Alexei Starovoitov <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jerome Mohm <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1


Reply via email to