FreeBSD Bugzilla – Attachment 79695 Details for
Bug 114451
[nfs] [patch] prevent NFS server possible crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 1.23 KB, created by
Rick Macklem
on 2007-07-09 18:00:08 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2007-07-09 18:00:08 UTC
Size:
1.23 KB
patch
obsolete
>When working on my server port, I spotted the following in FreeBSD-CURRENT >(May 2007 snapshot) in sys/nfsserver/nfs_serv.c (lines 3596-3612) > /* > * Probe one of the directory entries to see if the filesystem > * supports VGET. > */ > if (VFS_VGET(vp->v_mount, dp->d_fileno, LK_EXCLUSIVE, &nvp) == > EOPNOTSUPP) { > error = NFSERR_NOTSUPP; > vrele(vp); > vp = NULL; > free((caddr_t)cookies, M_TEMP); > free((caddr_t)rbuf, M_TEMP); > nfsm_reply(NFSX_V3POSTOPATTR); > nfsm_srvpostop_attr(getret, &at); > error = 0; > goto nfsmout; > } > vput(nvp); > *** nvp not set when VFS_VGET() returns an error other than > EOPNOTSUPP. > >If you look at the above, it's pretty obvious that, if VFS_VGET() returns >an error other than EOPNOTSUPP, then it vputs crap. >Maybe should be something like (haven't actually tested this): > /* > * Probe one of the directory entries to see if the filesystem > * supports VGET. > */ > error = VFS_VGET(vp->v_mount, dp->d_fileno, LK_EXCLUSIVE, &nvp); > if (error == EOPNOTSUPP) { > error = NFSERR_NOTSUPP; > vrele(vp); > vp = NULL; > free((caddr_t)cookies, M_TEMP); > free((caddr_t)rbuf, M_TEMP); > nfsm_reply(NFSX_V3POSTOPATTR); > nfsm_srvpostop_attr(getret, &at); > error = 0; > goto nfsmout; > } > if (error) > error = 0; > else > vput(nvp);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 114451
: 79695