Skip to content

Commit 980608f

Browse files
author
J. Bruce Fields
committed
nfsd4: disallow SEEK with special stateids
If the client uses a special stateid then we'll pass a NULL file to vfs_llseek. Fixes: 24bab49 " NFSD: Implement SEEK" Cc: Anna Schumaker <Anna.Schumaker@Netapp.com> Cc: stable@vger.kernel.org Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 5ba4a25 commit 980608f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/nfsd/nfs4proc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,8 @@ nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
10711071
dprintk("NFSD: nfsd4_seek: couldn't process stateid!\n");
10721072
return status;
10731073
}
1074+
if (!file)
1075+
return nfserr_bad_stateid;
10741076

10751077
switch (seek->seek_whence) {
10761078
case NFS4_CONTENT_DATA:

0 commit comments

Comments
 (0)