Bug 762251 (GLUSTER-519)

Summary: Possible SEGV when tracing readlink
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: traceAssignee: Vijay Bellur <vbellur>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: aavati
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeff Darcy 2010-01-04 19:57:50 UTC
The last arg for a readlink callback is supposed to be a struct stat *, which trace_readlink_cbk receives but fails to propagate when it unwinds the stack.  Patch fragment to fix this is:

-       STACK_UNWIND (frame, op_ret, op_errno, buf);
+       STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, buf, stbuf);

I actually found this when I tripped over a similar SEGV in my own create code, and converted from STACK_UNWIND to STACK_UNWIND_STRICT throughout.  When I got an error in my readlink_cbk, I checked trace_readlink_cbk from which it had been derived.

Comment 1 Anand Avati 2010-01-23 19:30:58 UTC
PATCH: http://patches.gluster.com/patch/2687 in master (trace: multiple fixes)