mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
nfsd: Detect unhashed stids in nfsd4_verify_open_stid()
The state of the stid is guaranteed by 2 locks:
- The nfs4_client 'cl_lock' spinlock
- The nfs4_ol_stateid 'st_mutex' mutex
so it is quite possible for the stid to be unhashed after lookup,
but before calling nfsd4_lock_ol_stateid(). So we do need to check
for a zero value for 'sc_type' in nfsd4_verify_open_stid().
Signed-off-by: Trond Myklebust <[email protected]>
Tested-by: Checuk Lever <[email protected]>
Cc: [email protected]
Fixes: 659aefb68e "nfsd: Ensure we don't recognise lock stateids..."
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
d0945caafc
commit
4f1764172a
1 changed files with 1 additions and 0 deletions
|
|
@ -3590,6 +3590,7 @@ nfsd4_verify_open_stid(struct nfs4_stid *s)
|
|||
switch (s->sc_type) {
|
||||
default:
|
||||
break;
|
||||
case 0:
|
||||
case NFS4_CLOSED_STID:
|
||||
case NFS4_CLOSED_DELEG_STID:
|
||||
ret = nfserr_bad_stateid;
|
||||
|
|
|
|||
Loading…
Reference in a new issue