aboutsummaryrefslogtreecommitdiffstats
path: root/fs/qnx4
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-11-14 11:19:55 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-11-18 13:35:58 -0500
commit3e7dfb1659c2888fc0152ec2b02a5e932397bb0a (patch)
tree301cbdf7e52009221b137a1d028a1b916d38e167 /fs/qnx4
parentNFSv4.1: Fix a regression in DELEGRETURN (diff)
downloadlinux-dev-3e7dfb1659c2888fc0152ec2b02a5e932397bb0a.tar.xz
linux-dev-3e7dfb1659c2888fc0152ec2b02a5e932397bb0a.zip
NFSv4: Fix CLOSE races with OPEN
If the reply to a successful CLOSE call races with an OPEN to the same file, we can end up scribbling over the stateid that represents the new open state. The race looks like: Client Server ====== ====== CLOSE stateid A on file "foo" CLOSE stateid A, return stateid C OPEN file "foo" OPEN "foo", return stateid B Receive reply to OPEN Reset open state for "foo" Associate stateid B to "foo" Receive CLOSE for A Reset open state for "foo" Replace stateid B with C The fix is to examine the argument of the CLOSE, and check for a match with the current stateid "other" field. If the two do not match, then the above race occurred, and we should just ignore the CLOSE. Reported-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/qnx4')
0 files changed, 0 insertions, 0 deletions