cifs: Allocate encryption header through kmalloc
authorLong Li <longli@microsoft.com>
Fri, 27 Mar 2020 05:09:20 +0000 (22:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:36 +0000 (10:36 +0200)
commit23e2519760f82c3e45a9fcab4713163c17e6daf4
tree10aa6ff693e7f0781f54914bfdc0674883964c52
parent6ba010ea48563b3a01cbdffb5daf289ee8c76a84
cifs: Allocate encryption header through kmalloc

[ Upstream commit 3946d0d04bb360acca72db5efe9ae8440012d9dc ]

When encryption is used, smb2_transform_hdr is defined on the stack and is
passed to the transport. This doesn't work with RDMA as the buffer needs to
be DMA'ed.

Fix it by using kmalloc.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/transport.c