All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] io/channel: complete pread/pwrite_all API and fix multifd_file_recv_data
@ 2026-04-13 21:45 Junjie Cao
  2026-04-13 21:45 ` [PATCH v3 1/4] io/channel: introduce qio_channel_pread{v, }_all{, _eof}() Junjie Cao
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Junjie Cao @ 2026-04-13 21:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, peterx, farosas, junjie.cao

This series fixes two bugs in multifd_file_recv_data() and completes
the positioned read/write "all" API set for QIO channels.

Bug summary:
  - size_t variable storing ssize_t return: -1 wraps to SIZE_MAX
  - error_prepend() called without ERRP_GUARD(): NULL deref on short read

Changes since v2:
  - Added qio_channel_pread_all_eof() to complete the API set (Daniel)
  - Added pwrite_all / pwritev_all variants (Daniel)
  - Reworked doc comments to match existing API style (Daniel)
  - Added Fixes tag, expanded _eof test coverage, added CONFIG_PREADV guard

Changes since v1:
  - Used approach (b): add pread_all API instead of local retry loop
    (Daniel, Peter)

v2: https://lore.kernel.org/qemu-devel/20260318140113.434-1-junjie.cao@intel.com/
v1: https://lore.kernel.org/qemu-devel/20260316084618.52-1-junjie.cao@intel.com/

Junjie Cao (4):
  io/channel: introduce qio_channel_pread{v,}_all{,_eof}()
  io/channel: introduce qio_channel_pwrite{v,}_all()
  migration/file: fix type mismatch and NULL deref in
    multifd_file_recv_data
  tests/unit: add pread/pwrite _all tests for io channel file

 include/io/channel.h              | 133 +++++++++++++++++++
 io/channel.c                      | 139 ++++++++++++++++++++
 migration/file.c                  |  13 +-
 tests/unit/test-io-channel-file.c | 207 ++++++++++++++++++++++++++++++
 4 files changed, 486 insertions(+), 6 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-04-29 14:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 21:45 [PATCH v3 0/4] io/channel: complete pread/pwrite_all API and fix multifd_file_recv_data Junjie Cao
2026-04-13 21:45 ` [PATCH v3 1/4] io/channel: introduce qio_channel_pread{v, }_all{, _eof}() Junjie Cao
2026-04-14 15:49   ` Fabiano Rosas
2026-04-17  9:45   ` [PATCH v3 1/4] io/channel: introduce qio_channel_pread{v,}_all{,_eof}() Daniel P. Berrangé
2026-04-13 21:45 ` [PATCH v3 2/4] io/channel: introduce qio_channel_pwrite{v,}_all() Junjie Cao
2026-04-14 15:54   ` [PATCH v3 2/4] io/channel: introduce qio_channel_pwrite{v, }_all() Fabiano Rosas
2026-04-17  9:46   ` Daniel P. Berrangé via qemu development
2026-04-13 21:45 ` [PATCH v3 3/4] migration/file: fix type mismatch and NULL deref in multifd_file_recv_data Junjie Cao
2026-04-14 15:55   ` Fabiano Rosas
2026-04-13 21:45 ` [PATCH v3 4/4] tests/unit: add pread/pwrite _all tests for io channel file Junjie Cao
2026-04-14 16:01   ` Fabiano Rosas
2026-04-17  9:47   ` Daniel P. Berrangé
2026-04-17 16:51 ` [PATCH v3 0/4] io/channel: complete pread/pwrite_all API and fix multifd_file_recv_data Junjie Cao
2026-04-17  9:48   ` Daniel P. Berrangé
2026-04-17 14:04     ` Peter Xu
2026-04-26  8:15 ` Michael Tokarev
2026-04-26  8:21   ` Michael Tokarev
2026-04-29 14:24     ` Fabiano Rosas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.