Bug 762778 (GLUSTER-1046) - fd_t * being accessed after fd_unref()
Summary: fd_t * being accessed after fd_unref()
Keywords:
Status: CLOSED NOTABUG
Alias: GLUSTER-1046
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Shehjar Tikoo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-04 00:30 UTC by Krishna Srinivas
Modified: 2010-08-12 09:58 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Krishna Srinivas 2010-07-04 00:30:49 UTC
nfs3svc_remove_cbk():
         if (openfd) {
                fd_unref (openfd);
                nfs3_fdcache_remove (nfs3, openfd);
         }

openfd is being accessed after unref() if it is the last unref then it might segfault

Comment 1 Shehjar Tikoo 2010-07-04 01:58:06 UTC
(In reply to comment #0)
> nfs3svc_remove_cbk():
>          if (openfd) {
>                 fd_unref (openfd);
>                 nfs3_fdcache_remove (nfs3, openfd);
>          }
> 
> openfd is being accessed after unref() if it is the last unref then it might
> segfault

This is not a bug. NFS has a fd cache which holds the last reference so it is ok for the fdcache code to access fd after it is unref'ed for a remove op.


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