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