FreeBSD Bugzilla – Attachment 224479 Details for
Bug 255436
nfs client panic with non-sleepable locks on 14.0-CURRENT main-n246340-01bad87a76d
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
add check for NULL and forced dismounts for nfscl_delegreturnvp()
delerreturnvp.patch (text/plain), 1.37 KB, created by
Rick Macklem
on 2021-04-27 22:02:47 UTC
(
hide
)
Description:
add check for NULL and forced dismounts for nfscl_delegreturnvp()
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2021-04-27 22:02:47 UTC
Size:
1.37 KB
patch
obsolete
>--- sys/fs/nfsclient/nfs_clstate.c.crash 2021-04-27 06:30:07.749608000 -0700 >+++ sys/fs/nfsclient/nfs_clstate.c 2021-04-27 06:31:53.332007000 -0700 >@@ -3300,10 +3300,12 @@ nfscl_delegreturnvp(vnode_t vp, NFSPROC_T *p) > > np = VTONFS(vp); > cred = newnfs_getcred(); >+ dp = NULL; > NFSLOCKCLSTATE(); > clp = VFSTONFS(vp->v_mount)->nm_clp; >- dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, >- np->n_fhp->nfh_len); >+ if (clp != NULL) >+ dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, >+ np->n_fhp->nfh_len); > if (dp != NULL) { > nfscl_cleandeleg(dp); > nfscl_freedeleg(&clp->nfsc_deleg, dp, false); >--- sys/fs/nfsclient/nfs_clnode.c.crash 2021-04-27 07:02:44.665175000 -0700 >+++ sys/fs/nfsclient/nfs_clnode.c 2021-04-27 07:07:57.238565000 -0700 >@@ -289,8 +289,10 @@ ncl_reclaim(struct vop_reclaim_args *ap) > struct nfsnode *np = VTONFS(vp); > struct nfsdmap *dp, *dp2; > struct thread *td; >+ struct mount *mp; > > td = curthread; >+ mp = vp->v_mount; > > /* > * If the NLM is running, give it a chance to abort pending >@@ -317,7 +319,12 @@ ncl_reclaim(struct vop_reclaim_args *ap) > * vfs_hash_remove(), since it cannot be recalled once the > * nfs node is no longer available. > */ >- nfscl_delegreturnvp(vp, td); >+ MNT_ILOCK(mp); >+ if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) == 0) { >+ MNT_IUNLOCK(mp); >+ nfscl_delegreturnvp(vp, td); >+ } else >+ MNT_IUNLOCK(mp); > } > > vfs_hash_remove(vp);
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255436
:
224466
| 224479