From c442225fa37a2889221407deb7ab1883348bf83d Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 15 Mar 2026 01:45:23 +0000 Subject: util/nvmutil pread: rw_over_nrw exit, not set otherwise, if it's -1 and errno happens to be EINTR or EAGAIN, we might loop on what is a real error. this bug fixes that edge case. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index f1ea171b..60aacf07 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -2126,7 +2126,8 @@ real_pread_pwrite: else if (rw_type == IO_PWRITE) r = write(fd, mem, nrw); - r = rw_over_nrw(r, nrw); + if (rw_over_nrw(r, nrw) == -1) + return -1; } while (r == -1 && (errno == try_err(loop_eintr, EINTR) -- cgit v1.2.1