autobuild v3.12.2-29
Resolves: bz#1650138 Signed-off-by: Milind Changire <mchangir@redhat.com>
This commit is contained in:
parent
b919423cd2
commit
66578f0d8c
@ -0,0 +1,88 @@
|
|||||||
|
From 63aa90525f8f408526ee5e16c42dcc976245eca7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mohit Agrawal <moagrawa@redhat.com>
|
||||||
|
Date: Thu, 22 Nov 2018 18:28:35 +0530
|
||||||
|
Subject: [PATCH 451/451] core: Resolve memory leak at the time of graph init
|
||||||
|
|
||||||
|
Problem: In the commit 751b14f2bfd40e08ad395ccd98c6eb0a41ac4e91
|
||||||
|
one code path is missed to avoid leak at the time
|
||||||
|
of calling graph init
|
||||||
|
|
||||||
|
Solution: Before destroying graph call xlator fini to avoid leak for
|
||||||
|
server-side xlators those call init during graph init
|
||||||
|
|
||||||
|
> Credit: Pranith Kumar Karampuri
|
||||||
|
> fixes: bz#1651431
|
||||||
|
|
||||||
|
> Change-Id: I6e7cff0d792ab9d954524b28667e94f2d9ec19a2
|
||||||
|
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
||||||
|
> (Cherry pick from commit 12285e76e8f93ef6f6aa2611869bd1f40955dc9e)
|
||||||
|
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/21695/)
|
||||||
|
|
||||||
|
Change-Id: Ie81635622552d43f41bbbaf810c5009a2c772a31
|
||||||
|
BUG: 1650138
|
||||||
|
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
||||||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/156609
|
||||||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||||||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||||||
|
---
|
||||||
|
glusterfsd/src/glusterfsd.c | 36 +++++++++++++++++++++++++++++++++---
|
||||||
|
1 file changed, 33 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
|
||||||
|
index 262a0c1..2e43cdb 100644
|
||||||
|
--- a/glusterfsd/src/glusterfsd.c
|
||||||
|
+++ b/glusterfsd/src/glusterfsd.c
|
||||||
|
@@ -2338,6 +2338,23 @@ out:
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+int
|
||||||
|
+glusterfs_graph_fini(glusterfs_graph_t *graph)
|
||||||
|
+{
|
||||||
|
+ xlator_t *trav = NULL;
|
||||||
|
+
|
||||||
|
+ trav = graph->first;
|
||||||
|
+
|
||||||
|
+ while (trav) {
|
||||||
|
+ if (trav->init_succeeded) {
|
||||||
|
+ trav->fini(trav);
|
||||||
|
+ trav->init_succeeded = 0;
|
||||||
|
+ }
|
||||||
|
+ trav = trav->next;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
|
||||||
|
int
|
||||||
|
glusterfs_process_volfp (glusterfs_ctx_t *ctx, FILE *fp)
|
||||||
|
@@ -2384,10 +2401,23 @@ out:
|
||||||
|
fclose (fp);
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
- if (graph && (ctx && (ctx->active != graph)))
|
||||||
|
- glusterfs_graph_destroy (graph);
|
||||||
|
+ /* TODO This code makes to generic for all graphs
|
||||||
|
+ client as well as servers.For now it destroys
|
||||||
|
+ graph only for server-side xlators not for client-side
|
||||||
|
+ xlators, before destroying a graph call xlator fini for
|
||||||
|
+ xlators those call xlator_init to avoid leak
|
||||||
|
+ */
|
||||||
|
+ if (graph) {
|
||||||
|
+ xl = graph->first;
|
||||||
|
+ if ((ctx && (ctx->active != graph)) &&
|
||||||
|
+ (xl && !strcmp(xl->type, "protocol/server"))) {
|
||||||
|
+ glusterfs_graph_fini(graph);
|
||||||
|
+ glusterfs_graph_destroy(graph);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* there is some error in setting up the first graph itself */
|
||||||
|
- if (!ctx->active) {
|
||||||
|
+ if (!ctx || !ctx->active) {
|
||||||
|
emancipate (ctx, ret);
|
||||||
|
cleanup_and_exit (ret);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -192,7 +192,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
|
|||||||
%else
|
%else
|
||||||
Name: glusterfs
|
Name: glusterfs
|
||||||
Version: 3.12.2
|
Version: 3.12.2
|
||||||
Release: 28%{?dist}
|
Release: 29%{?dist}
|
||||||
%endif
|
%endif
|
||||||
License: GPLv2 or LGPLv3+
|
License: GPLv2 or LGPLv3+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -715,6 +715,7 @@ Patch0447: 0447-cluster-ec-Don-t-update-trusted.ec.version-if-fop-su.patch
|
|||||||
Patch0448: 0448-core-Resolve-memory-leak-at-the-time-of-graph-init.patch
|
Patch0448: 0448-core-Resolve-memory-leak-at-the-time-of-graph-init.patch
|
||||||
Patch0449: 0449-glusterd-mux-Optimize-brick-disconnect-handler-code.patch
|
Patch0449: 0449-glusterd-mux-Optimize-brick-disconnect-handler-code.patch
|
||||||
Patch0450: 0450-glusterd-fix-Resource-leak-coverity-issue.patch
|
Patch0450: 0450-glusterd-fix-Resource-leak-coverity-issue.patch
|
||||||
|
Patch0451: 0451-core-Resolve-memory-leak-at-the-time-of-graph-init.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GlusterFS is a distributed file-system capable of scaling to several
|
GlusterFS is a distributed file-system capable of scaling to several
|
||||||
@ -2663,6 +2664,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 22 2018 Milind Changire <mchangir@redhat.com> - 3.12.2-29
|
||||||
|
- fixes bugs bz#1650138
|
||||||
|
|
||||||
* Tue Nov 20 2018 Milind Changire <mchangir@redhat.com> - 3.12.2-28
|
* Tue Nov 20 2018 Milind Changire <mchangir@redhat.com> - 3.12.2-28
|
||||||
- fixes bugs bz#1626350 bz#1648210 bz#1649651 bz#1650138
|
- fixes bugs bz#1626350 bz#1648210 bz#1649651 bz#1650138
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user