cifs: create sd context must be a multiple of 8
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 4 Aug 2021 18:37:22 +0000 (18:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 06:59:06 +0000 (08:59 +0200)
commit3db5cb922800c83c966a1763fb1a443327dafe06
tree437b4c1e1527bb9ae12aabd7da19940027a4fd64
parentd1398e3715b15c7dc766d91daf2bdd534d374cd8
cifs: create sd context must be a multiple of 8

commit 7d3fc01796fc895e5fcce45c994c5a8db8120a8d upstream.

We used to follow the rule earlier that the create SD context
always be a multiple of 8. However, with the change:
cifs: refactor create_sd_buf() and and avoid corrupting the buffer
...we recompute the length, and we failed that rule.
Fixing that with this change.

Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2pdu.c