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: NTrond Myklebust <trond.myklebust@primarydata.com> Tested-by: NChecuk Lever <chuck.lever@oracle.com> Cc: stable@vger.kernel.org Fixes: 659aefb6 "nfsd: Ensure we don't recognise lock stateids..." Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
Showing
想要评论请 注册 或 登录