Bug 12377 - VFS module for GlusterFS leaks memory in connect path
Summary: VFS module for GlusterFS leaks memory in connect path
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.4.6
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-13 14:55 UTC by Anoop C S
Modified: 2017-05-24 13:12 UTC (History)
3 users (show)

See Also:


Attachments
Cherry-picked patch from master (1.29 KB, patch)
2016-10-13 14:55 UTC, Anoop C S
gd: review+
Details
Cherry-picked patch from master with Bug Id (1.34 KB, patch)
2016-10-13 16:25 UTC, Anoop C S
gd: review+
obnox: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anoop C S 2016-10-13 14:55:26 UTC
Created attachment 12571 [details]
Cherry-picked patch from master

The connect code path inside VFS module for GlusterFS tries to set snapdir-entry-path translator option as follows:

ret = glfs_set_xlator_option(fs, "*-snapview-client", "snapdir-entry-path",
                             handle->conn->connectpath);

In case of failure, the immediate return is leaking the talloced memory context tmp_ctx.
Comment 1 Anoop C S 2016-10-13 14:58:06 UTC
Patch applies cleanly to 4.4 and 4.3.
Comment 2 Guenther Deschner 2016-10-13 15:06:41 UTC
Comment on attachment 12571 [details]
Cherry-picked patch from master

Excellent, looks good of course, just one comment: could you please re-upload the patch including a "Bug: https://bugzilla.samba.org/show_bug.cgi?id=12377" line in the commit message?
Comment 3 Anoop C S 2016-10-13 16:23:19 UTC
Thanks Gunther,

My bad. I should have thought about it before uploading the patch. Re-uploading with Bug Id.
Comment 4 Anoop C S 2016-10-13 16:25:45 UTC
Created attachment 12572 [details]
Cherry-picked patch from master with Bug Id
Comment 5 Guenther Deschner 2016-10-13 17:24:34 UTC
Karolin, please add to 4.5 and 4.4. Thanks!
Comment 6 Michael Adam 2016-10-18 10:53:41 UTC
Karo, please pick for 4.4 and 4.5 - Thanks!
Comment 7 Karolin Seeger 2016-10-19 06:55:50 UTC
(In reply to Michael Adam from comment #6)
Pushed to autobuild-v4-{5,4}-test.
Comment 8 Karolin Seeger 2016-10-25 07:55:07 UTC
(In reply to Karolin Seeger from comment #7)
Pushed to both branches.
Closing out bug report.

Thanks!