[PATCH] preallocate result for glfs_realpath in vfs_glusterfs

Anoop C S anoopcs at redhat.com
Fri Oct 21 06:16:01 UTC 2016


On Fri, 2016-10-21 at 00:57 +0200, Michael Adam wrote:
> Hi all,
> 
> due to a recent change in glusterfs
> https://review.gluster.org/#/c/15332/ ,
> it is now wrong to just free the result
> of glfs_realpath(). This needs to be discussed,
> but here is a patch that makes us indedpendent
> of the allocation mechanism used by glfs_realpath()
> by handing in a pre-malloced result string.
> 
> This is based on discussions I had with
> Rajesh and Anoop today.
> 
> Reviews appreciated!
> Rajesh/Anoop, please also confirm this approach!
> 

I can confirm that with this patch smbd no longer segfaults while mounting the share via Windows,
CIFS and smbclient.

Since glfs_realpath honours pre-allocated memory this would be the most favourable approach.

--Anoop C S.

> Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 299 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161021/328c61b6/signature.sig>


More information about the samba-technical mailing list