Bug 1138621

Summary: Wrong error handling for mmap() syscall in gf-changelog-process.c FILE
Product: [Community] GlusterFS Reporter: santosh pradhan <spradhan>
Component: geo-replicationAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, gluster-bugs, hchiramm, ndevos, vagarwal
Target Milestone: ---Keywords: EasyFix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
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:27:31 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 santosh pradhan 2014-09-05 10:31:06 UTC
Description of problem:
Error handling for mmap() in gf_changelog_parse_binary() and gf_changelog_parse_ascii() routines, FILE: gf-changelog-process.c, is not correct.

mmap() does not return NULL for FAIL case. Instead it returns MAP_FAILED (i.e. (void *) -1).

Refer: man page for mmap().


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Anand Avati 2014-11-15 22:17:26 UTC
REVIEW: http://review.gluster.org/9130 (changelog: correct mmap() error checking) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 3 Anand Avati 2014-11-18 02:56:21 UTC
COMMIT: http://review.gluster.org/9130 committed in master by Venky Shankar (vshankar) 
------
commit cc57d9bee98270e6e961765716d421bf2f0950d3
Author: Niels de Vos <ndevos>
Date:   Sat Nov 15 23:07:04 2014 +0100

    changelog: correct mmap() error checking
    
    Upon failure, mmap() returns MAP_FAILED, which is not equal to NULL.
    This small correction makes sure that the potential error gets caught
    and handled.
    
    BUG: 1138621
    Change-Id: I0a88b5187afa7187dcaa8f7d2cb0f9bb775c929d
    Reported-by: Santosh Pradhan <santosh.pradhan>
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/9130
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Venky Shankar <vshankar>
    Tested-by: Venky Shankar <vshankar>

Comment 4 Niels de Vos 2015-05-14 17:27:31 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:35 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:37:57 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:43:41 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