Bug 1651322 - Incorrect usage of local->fd in afr_open_ftruncate_cbk
Summary: Incorrect usage of local->fd in afr_open_ftruncate_cbk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: 5
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1648687 1655527 1655578
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-19 16:58 UTC by Soumya Koduri
Modified: 2019-05-18 06:32 UTC (History)
2 users (show)

Fixed In Version: glusterfs-5.5
Clone Of: 1648687
Environment:
Last Closed: 2019-05-18 06:32:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 21617 0 None None None 2018-11-19 16:58:52 UTC
Gluster.org Gerrit 21677 0 None Open afr: open_ftruncate_cbk should read fd from local->cont.open struct 2018-11-29 15:35:22 UTC

Description Soumya Koduri 2018-11-19 16:58:52 UTC
+++ This bug was initially created as a clone of Bug #1648687 +++

Description of problem:

afr_open() stores fd reference in local->cont.open structure. But in the callback function "afr_open_ftruncate_cbk" ( when openflags contain 'O_TRUNC' set), we reference local->fd in AFR_STACK_UNWIND resulting in error or crash.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Soumya Koduri on 2018-11-11 12:34:37 EST ---

Patch posted for review - https://review.gluster.org/#/c/glusterfs/+/21617/

--- Additional comment from Worker Ant on 2018-11-11 12:45:42 EST ---

REVIEW: https://review.gluster.org/21617 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#2) for review on master by soumya k

--- Additional comment from Worker Ant on 2018-11-15 00:08:03 EST ---

REVIEW: https://review.gluster.org/21617 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#8) for review on master by Ravishankar N

Comment 1 Worker Ant 2018-11-19 17:02:48 UTC
REVIEW: https://review.gluster.org/21677 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#1) for review on release-5 by soumya k

Comment 2 Worker Ant 2018-11-29 15:35:21 UTC
REVIEW: https://review.gluster.org/21677 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#2) for review on release-5 by Shyamsundar Ranganathan


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