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:30:19 +0000 (10:30 +0200)
commit731a3bc2be26c775fb70f66a273c1c10b50b0d05
treee85196377e62ed71e8bf2d30acc7582888f88791
parent1421615c646a43b905055a41a7ca62215f4662f9
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