Commit 03537826 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Steve French
Browse files

smb: client: return an error if rdma_connect does not return within 5 seconds



This matches the timeout for tcp connections.

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: f198186a ("CIFS: SMBD: Establish SMB Direct connection")
Signed-off-by: default avatarStefan Metzmacher <metze@samba.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent bef82d58
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1653,8 +1653,10 @@ static struct smbd_connection *_smbd_get_connection(
		goto rdma_connect_failed;
	}

	wait_event_interruptible(
		info->conn_wait, sc->status != SMBDIRECT_SOCKET_CONNECTING);
	wait_event_interruptible_timeout(
		info->conn_wait,
		sc->status != SMBDIRECT_SOCKET_CONNECTING,
		msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT));

	if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
		log_rdma_event(ERR, "rdma_connect failed port=%d\n", port);