[Gluster-devel] crypt xlator bug

Jeff Darcy jdarcy at redhat.com
Thu Apr 2 12:20:56 UTC 2015


> I think, crypt xlator should do a mem_put of local after doing STACK_UNWIND
> like other xlators which also use mem_get for local (such as AFR). I am
> suspecting crypt not doing mem_put might be the reason for the bug
> mentioned.

My understanding was that mem_put should be called automatically from
FRAME_DESTROY, which is itself called from STACK_DESTROY when the fop
completes (e.g. at FUSE or GFAPI).  On the other hand, I see that AFR
and others call mem_put themselves, without zeroing the local pointer.
In my (possibly no longer relevant) experience, freeing local myself
without zeroing the pointer would lead to a double free, and I don't
see why that's not the case here.  What am I missing?


More information about the Gluster-devel mailing list