summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2023-04-04 16:29:54 +0200
committerSteve French <stfrench@microsoft.com>2023-04-24 07:09:10 +0200
commitaf36c51e0e111de4e908328d49cba49de758f66e (patch)
treec8c758db85fa296bd620c30f2f37e02cf5506036 /fs/namei.c
parentksmbd: avoid duplicate negotiate ctx offset increments (diff)
downloadlinux-af36c51e0e111de4e908328d49cba49de758f66e.tar.xz
linux-af36c51e0e111de4e908328d49cba49de758f66e.zip
ksmbd: remove unused compression negotiate ctx packing
build_compression_ctxt() is currently unreachable due to conn.compress_algorithm remaining zero (SMB3_COMPRESS_NONE). It appears to have been broken in a couple of subtle ways over the years: - prior to d6c9ad23b421 ("ksmbd: use the common definitions for NEGOTIATE_PROTOCOL") smb2_compression_ctx.DataLength was set to 8, which didn't account for the single CompressionAlgorithms flexible array member. - post d6c9ad23b421 smb2_compression_capabilities_context CompressionAlgorithms is a three member array, while CompressionAlgorithmCount is set to indicate only one member. assemble_neg_contexts() ctxt_size is also incorrectly incremented by sizeof(struct smb2_compression_capabilities_context) + 2, which assumes one flexible array member. Signed-off-by: David Disseldorp <ddiss@suse.de> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/namei.c')
0 files changed, 0 insertions, 0 deletions