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

From: Stefano Garzarella

Date: Thu Apr 23 2026 - 03:55:40 EST


On Wed, Apr 22, 2026 at 11:48:11PM -0700, Dexuan Cui wrote:
Commit f63152958994 fixes a regression, however it fails to report an
error for malformed/short packets -- normally we should never see such
packets, but let's report an error for them just in case.

Fixes: f63152958994 ("hv_sock: Report EOF instead of -EIO for FIN")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>
---

Commit f63152958994 is currently only in net.git's master branch.

Changes since v1:
Integrated comments from Stefano Garzarella:

1) access 'vsk' directly:
s/hvs->vsk->peer_shutdown/vsk->peer_shutdown/

2) test the error condition first and return -EIO for that.

NO other changes.

Thanks, LGTM!

Acked-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>