Bug 762251 (GLUSTER-519) - Possible SEGV when tracing readlink
Summary: Possible SEGV when tracing readlink
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-519
Product: GlusterFS
Classification: Community
Component: trace
Version: mainline
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Vijay Bellur
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-04 19:57 UTC by Jeff Darcy
Modified: 2010-01-23 22:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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)


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