diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2024-02-09 11:25:42 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-02-11 19:07:08 -0600 |
commit | 79520587fe42cd4988aff8695d60621e689109cb (patch) | |
tree | 2b304831d7dfeb669eb2dd399b77d3811953e6dc /fs/smb/client/cifsglob.h | |
parent | cffe487026be13eaf37ea28b783d9638ab147204 (diff) | |
download | lwn-79520587fe42cd4988aff8695d60621e689109cb.tar.gz lwn-79520587fe42cd4988aff8695d60621e689109cb.zip |
cifs: update the same create_guid on replay
File open requests made to the server contain a
CreateGuid, which is used by the server to identify
the open request. If the same request needs to be
replayed, it needs to be sent with the same CreateGuid
in the durable handle v2 context.
Without doing so, we could end up leaking handles on
the server when:
1. multichannel is used AND
2. connection goes down, but not for all channels
This is because the replayed open request would have a
new CreateGuid and the server will treat this as a new
request and open a new handle.
This change fixes this by reusing the existing create_guid
stored in the cached fid struct.
REF: MS-SMB2 4.9 Replay Create Request on an Alternate Channel
Fixes: 4f1fffa23769 ("cifs: commands that are retried should have replay flag set")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r-- | fs/smb/client/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index c86a72c9d9ec..53c75cfb33ab 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -1378,6 +1378,7 @@ struct cifs_open_parms { struct cifs_fid *fid; umode_t mode; bool reconnect:1; + bool replay:1; /* indicates that this open is for a replay */ }; struct cifs_fid { |