diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2018-01-12 17:42:30 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-02-05 17:13:16 -0500 |
commit | 4f1764172a0aa7395d12b96cae640ca1438c5085 (patch) | |
tree | a29f5c6339d179a7975c76c221290c85137a193b /fs/nfsd/nfs4xdr.c | |
parent | d0945caafcccac9d8f4d78f99e0eac9e60386381 (diff) |
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 <trond.myklebust@primarydata.com>
Tested-by: Checuk Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org
Fixes: 659aefb68eca "nfsd: Ensure we don't recognise lock stateids..."
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
0 files changed, 0 insertions, 0 deletions