FreeBSD Bugzilla – Attachment 193840 Details for
Bug 228497
[nfs] kernel panic in nfsrv_checksequence
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix locking for destroysession in the NFSv4.1 server
destsess.patch (text/plain), 1.08 KB, created by
Rick Macklem
on 2018-05-30 13:13:47 UTC
(
hide
)
Description:
fix locking for destroysession in the NFSv4.1 server
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2018-05-30 13:13:47 UTC
Size:
1.08 KB
patch
obsolete
>--- fs/nfsserver/nfs_nfsdstate.c.nodstsess 2018-05-29 18:15:02.777775000 -0400 >+++ fs/nfsserver/nfs_nfsdstate.c 2018-05-30 08:11:52.222818000 -0400 >@@ -6005,17 +6005,32 @@ nfsrv_findsession(uint8_t *sessionid) > int > nfsrv_destroysession(struct nfsrv_descript *nd, uint8_t *sessionid) > { >- int error, samesess; >+ int error, igotlock, samesess; > > samesess = 0; >- if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID)) { >+ if (!NFSBCMP(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID) && >+ (nd->nd_flag & ND_HASSEQUENCE) != 0) { > samesess = 1; > if ((nd->nd_flag & ND_LASTOP) == 0) > return (NFSERR_BADSESSION); > } >+ >+ /* Lock out other nfsd threads */ >+ NFSLOCKV4ROOTMUTEX(); >+ nfsv4_relref(&nfsv4rootfs_lock); >+ do { >+ igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, >+ NFSV4ROOTLOCKMUTEXPTR, NULL); >+ } while (igotlock == 0); >+ NFSUNLOCKV4ROOTMUTEX(); >+ > error = nfsrv_freesession(NULL, sessionid); > if (error == 0 && samesess != 0) > nd->nd_flag &= ~ND_HASSEQUENCE; >+ >+ NFSLOCKV4ROOTMUTEX(); >+ nfsv4_unlock(&nfsv4rootfs_lock, 1); >+ NFSUNLOCKV4ROOTMUTEX(); > return (error); > } >
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 228497
:
193829
|
193832
| 193840