Darshan N has uploaded a new change for review.

Change subject: gluster: proper check in gfapi.py to avoid segfault in libgfapi
......................................................................

gluster: proper check in gfapi.py to avoid segfault in libgfapi

This patch adds proper checks in gfapi.py to avoid
segmentation fault in libgfapi.

Change-Id: Ie32cdc723a78a30a4efc0c2e75e1b308fc756bf3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1162640
Signed-off-by: ndarshan <[email protected]>
---
M vdsm/gluster/gfapi.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/35256/1

diff --git a/vdsm/gluster/gfapi.py b/vdsm/gluster/gfapi.py
index 2aee49b..6f7cb7e 100644
--- a/vdsm/gluster/gfapi.py
+++ b/vdsm/gluster/gfapi.py
@@ -50,6 +50,11 @@
 
 def glfsInit(volumeId, host, port, protocol):
     fs = _glfs_new(volumeId)
+    if fs is None:
+        raise ge.GlfsInitException(
+            rc=7,
+            err=['glfs_new(%s) failed' % volumeId]
+        )
 
     rc = _glfs_set_volfile_server(fs,
                                   protocol,


-- 
To view, visit http://gerrit.ovirt.org/35256
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie32cdc723a78a30a4efc0c2e75e1b308fc756bf3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to