Bug 1047902 - Possible small memory leak in rpcsvc_drc_init()
Summary: Possible small memory leak in rpcsvc_drc_init()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 14:31 UTC by santosh pradhan
Modified: 2014-11-11 08:26 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-11 08:26:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description santosh pradhan 2014-01-02 14:31:54 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:

Actual results:

Expected results:

Additional info:

1. The routine rpcsvc_drc_init() is only used while initialization of NFS xlator. It should just check for nfs.drc option and init DRC feature accordingly. If it's set to OFF, then rpcsvc_drc_init() allocates memory for svc.drc and set ret value to 0 and goes to out: block where drc is leaked.

2. rpcsvc_drc_init() should just allocate svc.drc and init it. Here svc.drc can never be valid. 

3. If svc.drc gets init'd here, no point of checking for drc type here.

Comment 1 Anand Avati 2014-01-02 15:29:07 UTC
REVIEW: http://review.gluster.org/6628 (gNFS: Small memory leak in rpcsvc_drc_init()) posted (#1) for review on master by Santosh Pradhan (spradhan@redhat.com)

Comment 2 Anand Avati 2014-01-02 15:32:44 UTC
REVIEW: http://review.gluster.org/6628 (gNFS: Small memory leak in rpcsvc_drc_init()) posted (#2) for review on master by Santosh Pradhan (spradhan@redhat.com)

Comment 3 Anand Avati 2014-01-04 06:17:43 UTC
COMMIT: http://review.gluster.org/6628 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit 825b976ee30a53e89fe747b4a3ba8f2eb862047c
Author: Santosh Kumar Pradhan <spradhan@redhat.com>
Date:   Thu Jan 2 20:55:59 2014 +0530

    gNFS: Small memory leak in rpcsvc_drc_init()
    
    1. The routine rpcsvc_drc_init() is only used while initialization of
    NFS xlator. It should just check for nfs.drc option and init DRC feature
    accordingly. If it's set to OFF, then rpcsvc_drc_init() allocates memory
    for svc.drc and set ret value to 0 and goes to out: block where drc is
    leaked.
    
    2. rpcsvc_drc_init() should just allocate svc.drc and init it. Here
    svc.drc can never be valid.
    
    3. If svc.drc gets init'd here, no point of checking for drc type here.
    
    Change-Id: I4085771cdb8c9c15d1b9c548b77929a37f27c124
    BUG: 1047902
    Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
    Reviewed-on: http://review.gluster.org/6628
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Comment 6 Niels de Vos 2014-09-22 12:34:22 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 7 Niels de Vos 2014-11-11 08:26:20 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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users


Note You need to log in before you can comment on or make changes to this bug.