Bug 1199003

Summary: Avoid possibility of segfault if xl->ctx is NULL.
Product: [Community] GlusterFS Reporter: Humble Chirammal <hchiramm>
Component: coreAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: bugs, gluster-bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.7.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-14 17:29:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Humble Chirammal 2015-03-05 10:09:17 UTC
Description of problem:

If xl->ctx is null, it can lead to segfault in xlator.c.  In different code paths the ctx is getting adjusted, so we have to make sure the ctx is not null before proceeding. 

Version-Release number of selected component (if applicable):

GlusterFS 3.6.2

How reproducible:

N/A

Steps to Reproduce:

N/A

Actual results:

The dereferencing operations can lead to segfault as the ctx is getting tainted at times in different paths. 
 
Expected results:

There shouldnt be any crash because ctx being null.

Additional info:

Comment 1 Anand Avati 2015-03-05 10:10:20 UTC
REVIEW: http://review.gluster.org/9810 (xlator: avoiding possibility of a crash if (xl->ctx) is NULL.) posted (#1) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 2 Anand Avati 2015-03-09 12:01:10 UTC
REVIEW: http://review.gluster.org/9810 (xlator: avoiding possibility of a crash if (xl->ctx) is NULL.) posted (#2) for review on master by Humble Devassy Chirammal (humble.devassy)

Comment 3 Anand Avati 2015-03-16 03:01:27 UTC
COMMIT: http://review.gluster.org/9810 committed in master by Vijay Bellur (vbellur) 
------
commit 38e342ca4a2167720bea82d3cee7fca08baba666
Author: Humble Devassy Chirammal <hchiramm>
Date:   Wed Mar 4 18:38:07 2015 +0530

    xlator: avoiding possibility of a crash if (xl->ctx) is NULL.
    
    Change-Id: I41acd9970bef04bb16cd4d8532a84a95d5fb642a
    BUG: 1199003
    Signed-off-by: Humble Devassy Chirammal <hchiramm>.
    Reviewed-on: http://review.gluster.org/9810
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra Bhat <raghavendra>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 4 Niels de Vos 2015-05-14 17:29:17 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 5 Niels de Vos 2015-05-14 17:35:52 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 6 Niels de Vos 2015-05-14 17:38:14 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Niels de Vos 2015-05-14 17:46:13 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user