diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-01-29 12:46:17 +1000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-01-29 16:17:25 -0600 |
commit | c4627e66f73a28c5515b908c90c2bf7120086497 (patch) | |
tree | 857fafd021a0dda647645574c20b8dc44fe0d945 /fs/cifs/smb2ops.c | |
parent | 58d15ed1203f4d858c339ea4d7dafa94bd2a56d3 (diff) |
cifs: limit amount of data we request for xattrs to CIFSMaxBufSize
minus the various headers and blobs that will be part of the reply.
or else we might trigger a session reconnect.
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 153238fc4fa9..6f96e2292856 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -866,7 +866,9 @@ smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon, FILE_READ_EA, FILE_FULL_EA_INFORMATION, SMB2_O_INFO_FILE, - SMB2_MAX_EA_BUF, + CIFSMaxBufSize - + MAX_SMB2_CREATE_RESPONSE_SIZE - + MAX_SMB2_CLOSE_RESPONSE_SIZE, &rsp_iov, &buftype, cifs_sb); if (rc) { /* |