RE: [EXTERNAL] Re: [PATCH net] hv_sock: Return -EIO for malformed/short packets

From: Dexuan Cui

Date: Wed Apr 22 2026 - 14:19:34 EST


> From: Stefano Garzarella <sgarzare@xxxxxxxxxx>
> Sent: Wednesday, April 22, 2026 2:40 AM
> ...
> >+ if (hvs->vsk->peer_shutdown & SEND_SHUTDOWN)
>
> We can access `vsk` directly, I mean `vsk->peer_shutdown`.
>
> >+ return 0;
> >+ else
>
> nit: we usually avoid the `else` if the other branch returns early, and
> maybe have the error returned first, so it's more clear when reading the
> comment on top. I mean something like this:
>
> if (!(vsk->peer_shutdown & SEND_SHUTDOWN))
> return -EIO;
>
> return 0;
>
> BTW, not a strong opinion on that.
>
> The rest, LGTM!
>
> Thanks,
> Stefano

Thank you Stefano! I'll post v2 later today.