|
|
e3c68b |
From 1aa175f353325775517daf1d48a19799e0cafc7a Mon Sep 17 00:00:00 2001
|
|
|
e3c68b |
From: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
e3c68b |
Date: Mon, 22 Jul 2019 20:55:33 +0530
|
|
|
e3c68b |
Subject: [PATCH 261/261] features/utime: Fix mem_put crash
|
|
|
e3c68b |
|
|
|
e3c68b |
Problem:
|
|
|
e3c68b |
When frame->local is not null FRAME_DESTROY calls mem_put on it.
|
|
|
e3c68b |
Since the stub is already destroyed in call_resume(), it leads
|
|
|
e3c68b |
to crash
|
|
|
e3c68b |
|
|
|
e3c68b |
Fix:
|
|
|
e3c68b |
Set frame->local to NULL before calling call_resume()
|
|
|
e3c68b |
|
|
|
e3c68b |
Backport of:
|
|
|
e3c68b |
> Patch: https://review.gluster.org/23091
|
|
|
e3c68b |
> fixes: bz#1593542
|
|
|
e3c68b |
> Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
|
|
|
e3c68b |
> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
e3c68b |
|
|
|
e3c68b |
BUG: 1715422
|
|
|
e3c68b |
Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
|
|
|
e3c68b |
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
e3c68b |
Reviewed-on: https://code.engineering.redhat.com/gerrit/176726
|
|
|
e3c68b |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
e3c68b |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
e3c68b |
---
|
|
|
e3c68b |
xlators/features/utime/src/utime.c | 4 +++-
|
|
|
e3c68b |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/xlators/features/utime/src/utime.c b/xlators/features/utime/src/utime.c
|
|
|
e3c68b |
index 2a986e7..e3a80b6 100644
|
|
|
e3c68b |
--- a/xlators/features/utime/src/utime.c
|
|
|
e3c68b |
+++ b/xlators/features/utime/src/utime.c
|
|
|
e3c68b |
@@ -139,12 +139,14 @@ gf_utime_set_mdata_setxattr_cbk(call_frame_t *frame, void *cookie,
|
|
|
e3c68b |
xlator_t *this, int op_ret, int op_errno,
|
|
|
e3c68b |
dict_t *xdata)
|
|
|
e3c68b |
{
|
|
|
e3c68b |
+ call_stub_t *stub = frame->local;
|
|
|
e3c68b |
/* Don't fail lookup if mdata setxattr fails */
|
|
|
e3c68b |
if (op_ret) {
|
|
|
e3c68b |
gf_msg(this->name, GF_LOG_ERROR, op_errno, UTIME_MSG_SET_MDATA_FAILED,
|
|
|
e3c68b |
"dict set of key for set-ctime-mdata failed");
|
|
|
e3c68b |
}
|
|
|
e3c68b |
- call_resume(frame->local);
|
|
|
e3c68b |
+ frame->local = NULL;
|
|
|
e3c68b |
+ call_resume(stub);
|
|
|
e3c68b |
return 0;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
|
|
|
e3c68b |
--
|
|
|
e3c68b |
1.8.3.1
|
|
|
e3c68b |
|