]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: make sure we call ib_dma_unmap_single() only if we called ib_dma_map_sin...
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Aug 2025 12:10:14 +0000 (14:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:09:04 +0000 (12:09 +0200)
commit83d2a4185f5a75b929a6a45aa1c0b2b9bcb9840e
treeecfd43769439ce62239f1daa7dfa0729b31ffdbc
parentf069f7c142044eb4f5d9ee17ecf6760a4c838147
smb: client: make sure we call ib_dma_unmap_single() only if we called ib_dma_map_single already

[ Upstream commit 047682c370b6f18fec818b57b0ed8b501bdb79f8 ]

In case of failures either ib_dma_map_single() might not be called yet
or ib_dma_unmap_single() was already called.

We should make sure put_receive_buffer() only calls
ib_dma_unmap_single() if needed.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Fixes: f198186aa9bb ("CIFS: SMBD: Establish SMB Direct connection")
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/smbdirect.c