From a498c478109395e7baa9b029c81d5587254bdd89 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 28 Aug 2019 11:55:17 +0530 Subject: debug/error-gen: Set count correctly for short-writes vector count is reduced to 1 but it is not reflected at the time of winding the call. This leads to crash when short-writes are done using error-gen. Set the correct count to fix the problem. fixes: bz#1746320 Change-Id: I037b60b7e321f2f50b71fb52c43c64707cf114ca Signed-off-by: Pranith Kumar K --- xlators/debug/error-gen/src/error-gen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/debug/error-gen') diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c index 8901e349e6f..ff993f7b5e5 100644 --- a/xlators/debug/error-gen/src/error-gen.c +++ b/xlators/debug/error-gen/src/error-gen.c @@ -761,6 +761,7 @@ error_gen_writev(call_frame_t *frame, xlator_t *this, fd_t *fd, */ shortvec = iov_dup(vector, 1); shortvec->iov_len /= 2; + count = 1; goto wind; } else if (op_errno) { GF_ERROR(this, "unwind(-1, %s)", strerror(op_errno)); -- cgit