aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2019-11-06 13:58:15 -0800
committerSteve French <stfrench@microsoft.com>2019-11-06 21:32:18 -0600
commitd243af7ab9feb49f11f2c0050d2077e2d9556f9b (patch)
tree13eb17794a679a4dcc4ad956bffbb62839d522ed /fs/cifs/smb2pdu.h
parentLinux 5.4-rc6 (diff)
downloadlinux-dev-d243af7ab9feb49f11f2c0050d2077e2d9556f9b.tar.xz
linux-dev-d243af7ab9feb49f11f2c0050d2077e2d9556f9b.zip
SMB3: Fix persistent handles reconnect
When the client hits a network reconnect, it re-opens every open file with a create context to reconnect a persistent handle. All create context types should be 8-bytes aligned but the padding was missed for that one. As a result, some servers don't allow us to reconnect handles and return an error. The problem occurs when the problematic context is not at the end of the create request packet. Fix this by adding a proper padding at the end of the reconnect persistent handle context. Cc: Stable <stable@vger.kernel.org> # 4.19.x Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r--fs/cifs/smb2pdu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index ea735d59c36e..0abfde6d0b05 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -838,6 +838,7 @@ struct create_durable_handle_reconnect_v2 {
struct create_context ccontext;
__u8 Name[8];
struct durable_reconnect_context_v2 dcontext;
+ __u8 Pad[4];
} __packed;
/* See MS-SMB2 2.2.13.2.5 */