]> Gentwo Git Trees - linux/.git/commit
smb: server: rdma: avoid unmapping posted recv on accept failure
authorJoshua Rogers <linux@joshua.hu>
Thu, 6 Nov 2025 16:15:37 +0000 (00:15 +0800)
committerSteve French <stfrench@microsoft.com>
Sun, 9 Nov 2025 23:47:49 +0000 (17:47 -0600)
commite904d81ad1c04394e1cda4610de799a006cc141c
tree09f004a98b2725bc7fdda9b4ed8f3c8fa43520c1
parente9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
smb: server: rdma: avoid unmapping posted recv on accept failure

smb_direct_prepare_negotiation() posts a recv and then, if
smb_direct_accept_client() fails, calls put_recvmsg() on the same
buffer. That unmaps and recycles a buffer that is still posted on
the QP., which can lead to device DMA into unmapped or reused memory.

Track whether the recv was posted and only return it if it was never
posted. If accept fails after a post, leave it for teardown to drain
and complete safely.

Signed-off-by: Joshua Rogers <linux@joshua.hu>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c