summary refs log tree commit diff
path: root/kernel/livepatch
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-08-09 14:33:12 -0500
committerSteve French <stfrench@microsoft.com>2018-08-09 21:20:01 -0500
commite02789a53d71334b067ad72eee5d4e88a0158083 (patch)
tree01cf76e9fd5a7a732257db28b522fb9d7aae8702 /kernel/livepatch
parent730928c8f4be88e9d6a027a16b1e8fa9c59fc077 (diff)
downloadlinux-e02789a53d71334b067ad72eee5d4e88a0158083.tar.gz
smb3: enumerating snapshots was leaving part of the data off end
When enumerating snapshots, the last few bytes of the final
snapshot could be left off since we were miscalculating the
length returned (leaving off the sizeof struct SRV_SNAPSHOT_ARRAY)
See MS-SMB2 section 2.2.32.2. In addition fixup the length used
to allow smaller buffer to be passed in, in order to allow
returning the size of the whole snapshot array more easily.

Sample userspace output with a kernel patched with this
(mounted to a Windows volume with two snapshots).
Before this patch, the second snapshot would be missing a
few bytes at the end.

~/cifs-2.6# ~/enum-snapshots /mnt/file
press enter to issue the ioctl to retrieve snapshot information ...

size of snapshot array = 102
Num snapshots: 2 Num returned: 2 Array Size: 102

Snapshot 0:@GMT-2018.06.30-19.34.17
Snapshot 1:@GMT-2018.06.30-19.33.37

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'kernel/livepatch')
0 files changed, 0 insertions, 0 deletions