summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-04-20 09:30:53 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-04-20 09:39:54 +0400
commit8e472f33b5ba742f9bfcf16f0328f5a7842b32d1 (patch)
tree9999ba6a0491bf3a3ee7a71540a5aa70e0d37a2d /fs
parent92b40e93849e29f9ca661de6442bb66282738bf7 (diff)
downloadlinux-8e472f33b5ba742f9bfcf16f0328f5a7842b32d1.tar.xz
NFSv4: Ensure the LOCK call cannot use the delegation stateid
Defensive patch to ensure that we copy the state->open_stateid, which can never be set to the delegation stateid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 39849360f9f6..ed01a66dc391 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4793,7 +4793,7 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata)
if (nfs_wait_on_sequence(data->arg.open_seqid, task) != 0) {
goto out_release_lock_seqid;
}
- data->arg.open_stateid = &state->stateid;
+ data->arg.open_stateid = &state->open_stateid;
data->arg.new_lock_owner = 1;
data->res.open_seqid = data->arg.open_seqid;
} else