summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2019-07-22 20:55:33 +0530
committerRinku Kothiya <rkothiya@redhat.com>2019-08-19 11:27:14 +0000
commitdf2ccb281c2475150d934a2410f998e88a88d1c6 (patch)
tree921f9304ed6f599ce0b4459b9db5df3aa05bb1bf /xlators
parent8d2aebf93baed6f8555cd02545d6f95da59cc7f3 (diff)
features/utime: Fix mem_put crash
Problem: When frame->local is not null FRAME_DESTROY calls mem_put on it. Since the stub is already destroyed in call_resume(), it leads to crash Fix: Set frame->local to NULL before calling call_resume() Backport of: > Patch: https://review.gluster.org/23091 > BUG: 1593542 > Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de > Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> fixes: bz#1739430 Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/utime/src/utime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/utime/src/utime.c b/xlators/features/utime/src/utime.c
index 2a986e71add..e3a80b6ed48 100644
--- a/xlators/features/utime/src/utime.c
+++ b/xlators/features/utime/src/utime.c
@@ -139,12 +139,14 @@ gf_utime_set_mdata_setxattr_cbk(call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
dict_t *xdata)
{
+ call_stub_t *stub = frame->local;
/* Don't fail lookup if mdata setxattr fails */
if (op_ret) {
gf_msg(this->name, GF_LOG_ERROR, op_errno, UTIME_MSG_SET_MDATA_FAILED,
"dict set of key for set-ctime-mdata failed");
}
- call_resume(frame->local);
+ frame->local = NULL;
+ call_resume(stub);
return 0;
}