diff options
author | Niels de Vos <ndevos@redhat.com> | 2016-12-14 08:47:28 +0100 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-12-19 05:02:40 -0800 |
commit | 356e8557ec04f6edae9c6e81f0ad6f52bafceeed (patch) | |
tree | e9982f906b322a6f4b9f11ae82f6b3f56c3ec07c /xlators | |
parent | ef40ff80a642acd3b55046c1674ccaf68dc6d97d (diff) |
upcall: Fix 'use after free' in a log message
There is chance of accessing freed pointer in a log message at TRACE
level while cleaning up expired client entries.
Cherry picked from commit 212c7600d2070a4414bc89fd7d2c186b5994cd54:
> Change-Id: I06b4dad755df63978ab04ca52442bfd4600d139a
> BUG: 1404168
> Reported-by: Ravishankar N <ravishankar@redhat.com>
> Signed-off-by: Soumya Koduri <skoduri@redhat.com>
> Reviewed-on: http://review.gluster.org/16117
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
Change-Id: I06b4dad755df63978ab04ca52442bfd4600d139a
BUG: 1404581
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/16127
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/upcall/src/upcall-internal.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c index ba19a7c7a76..187c9eb92be 100644 --- a/xlators/features/upcall/src/upcall-internal.c +++ b/xlators/features/upcall/src/upcall-internal.c @@ -258,6 +258,11 @@ upcall_cleanup_expired_clients (xlator_t *this, up_client->access_time; if (t_expired > (2*timeout)) { + + gf_log (THIS->name, GF_LOG_TRACE, + "Cleaning up client_entry(%s)", + up_client->client_uid); + ret = __upcall_cleanup_client_entry (up_client); @@ -268,9 +273,6 @@ upcall_cleanup_expired_clients (xlator_t *this, up_client); goto out; } - gf_log (THIS->name, GF_LOG_TRACE, - "Cleaned up client_entry(%s)", - up_client->client_uid); } } } |