SMB3: Fix persistent handles reconnect
authorPavel Shilovsky <pshilov@microsoft.com>
Wed, 6 Nov 2019 21:58:15 +0000 (13:58 -0800)
committerSteve French <stfrench@microsoft.com>
Thu, 7 Nov 2019 03:32:18 +0000 (21:32 -0600)
commitd243af7ab9feb49f11f2c0050d2077e2d9556f9b
tree13eb17794a679a4dcc4ad956bffbb62839d522ed
parenta99d8080aaf358d5d23581244e5da23b35e340b9
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>
fs/cifs/smb2pdu.h