Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] vsock/virtio: fix msg_iter desync on transmission failure
@ 2026-06-13  0:09 Octavian Purdila
  2026-06-13  0:09 ` [PATCH net v2 1/2] iov_iter: export iov_iter_restore Octavian Purdila
  2026-06-13  0:09 ` [PATCH net v2 2/2] vsock/virtio: restore msg_iter on transmission failure Octavian Purdila
  0 siblings, 2 replies; 3+ messages in thread
From: Octavian Purdila @ 2026-06-13  0:09 UTC (permalink / raw)
  To: netdev
  Cc: Alexander Viro, Andrew Morton, Arseniy Krasnov, David S. Miller,
	Eric Dumazet, Eugenio Pérez, Jakub Kicinski, Jason Wang, kvm,
	linux-block, linux-fsdevel, linux-kernel, Michael S. Tsirkin,
	Paolo Abeni, Simon Horman, Stefan Hajnoczi, Stefano Garzarella,
	virtualization, Xuan Zhuo, Octavian Purdila

This series fixes a msg_iter desync issue in the virtio vsock transport
that can lead to warnings and eventual -ENOMEM under specific failure
scenarios (e.g. partial GUP failure during MSG_ZEROCOPY transmission).

To fix this, we need to restore the msg_iter state on transmission failure.
However, since virtio vsock transport can be built as a module, we first
need to export iov_iter_restore.

Patch 1 exports iov_iter_restore.
Patch 2 implements the msg_iter restoration in virtio vsock.

Changes in v2:
- Use iov_iter_savestate()/iov_iter_restore() (Stefano)
- Use a single restore point (Stefano)
- Reverse xmas tree (Stefano)
- Added comments in the code (Stefano)

v1: https://lore.kernel.org/all/20260609004809.1285028-1-tavip@google.com/

Octavian Purdila (2):
  iov_iter: export iov_iter_restore
  vsock/virtio: restore msg_iter on transmission failure

 lib/iov_iter.c                          |  1 +
 net/vmw_vsock/virtio_transport_common.c | 13 +++++++++++++
 2 files changed, 14 insertions(+)

-- 
2.54.0.1136.gdb2ca164c4-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-13  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-13  0:09 [PATCH net v2 0/2] vsock/virtio: fix msg_iter desync on transmission failure Octavian Purdila
2026-06-13  0:09 ` [PATCH net v2 1/2] iov_iter: export iov_iter_restore Octavian Purdila
2026-06-13  0:09 ` [PATCH net v2 2/2] vsock/virtio: restore msg_iter on transmission failure Octavian Purdila

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox