Received: by 10.192.165.148 with SMTP id m20csp2535543imm; Sun, 22 Apr 2018 09:03:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx494pLnhoL9SxxGUkf/44gSn2IRA2v1dq8jeY1/t9gOVsygRz1Z9U9K+haI/Wbd6O7JAoRbD X-Received: by 2002:a17:902:7841:: with SMTP id e1-v6mr17970964pln.197.1524413033130; Sun, 22 Apr 2018 09:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413033; cv=none; d=google.com; s=arc-20160816; b=hJXn2wXvcYy0xhQbq6V6JVaMTaxcY6ly5sCKUn7qTJmemu1FFDg2b3Dt6SlaMr7dM9 gSmvSkL22ChJl4jWGUM8GAMay6JAuMmxzZys2evZonmVOEn7qMboX6oyyCdGU3/R8+Fk 5cleImpFiJJpf+5uEcePXfIoM7Mw2xU7yHSKY1ttP1M82t621hS+udyLum/YS5of9ZTJ Z0fXUa+E9hFJGBSbsiB01kMKImmm6md9yGpH4bZhOkMpxCH9W5J+wrePwig0/maAE0Zj U63QNkhlJgaq2SW31oK2hhZqJnCu4XjhP4M80RbD85zSEVEgS5xr2aTmRN4/mr1xZU3B VrIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xpxrdswoTy0wpAa3RT6LnmWy7O3EqSrhMNkRNYzfJ3k=; b=LY95zSwsiILPR06SCulDd9YuptYf2ESPdK4VxOqQn313PR3RzusxF/4HiEt38K5c2u C4rBRvicLljObnuDw7uxVYMheczxehtU/Szeo069DZ2h62ugWkSFx+HjIVWZbDmjzJdh HhqUUvkCNNNfOQ/liLC+BQnE9wyW5SjYpSk48Tuyq6R1Y6NU/23veXtV83T7wlVWcd7f XcLiKZzaUx5zZMDw2DaKneP946LFKd3v0aNZrLhZ/19UdUfs4JudiWLVUnp/1Tdx2bT3 tY50UyBpwP1Lac4TAADyQdro7XNfbm/YemUpnU19AN17CePIErHKbOvn5BIRDZo29KzU Dhpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si9294394pfm.283.2018.04.22.09.03.38; Sun, 22 Apr 2018 09:03:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754295AbeDVQCf (ORCPT + 99 others); Sun, 22 Apr 2018 12:02:35 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46096 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754096AbeDVN6K (ORCPT ); Sun, 22 Apr 2018 09:58:10 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B3080CD8; Sun, 22 Apr 2018 13:58:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Long Li , Steve French , Ronnie Sahlberg Subject: [PATCH 4.16 049/196] cifs: smbd: disconnect transport on RDMA errors Date: Sun, 22 Apr 2018 15:51:09 +0200 Message-Id: <20180422135106.622685140@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Long Li commit 21a4e14aaedbc85f203d37e56cb26235b22b43f6 upstream. On RDMA errors, transport should disconnect the RDMA CM connection. This will notify the upper layer, and it will attempt transport reconnect. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smbdirect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -862,6 +862,8 @@ static int smbd_post_send_negotiate_req( ib_dma_unmap_single(info->id->device, request->sge[0].addr, request->sge[0].length, DMA_TO_DEVICE); + smbd_disconnect_rdma_connection(info); + dma_mapping_failed: mempool_free(request, info->request_mempool); return rc; @@ -1061,6 +1063,7 @@ static int smbd_post_send(struct smbd_co if (atomic_dec_and_test(&info->send_pending)) wake_up(&info->wait_send_pending); } + smbd_disconnect_rdma_connection(info); } else /* Reset timer for idle connection after packet is sent */ mod_delayed_work(info->workqueue, &info->idle_timer_work, @@ -1202,7 +1205,7 @@ static int smbd_post_recv( if (rc) { ib_dma_unmap_single(info->id->device, response->sge.addr, response->sge.length, DMA_FROM_DEVICE); - + smbd_disconnect_rdma_connection(info); log_rdma_recv(ERR, "ib_post_recv failed rc=%d\n", rc); } @@ -2546,6 +2549,8 @@ dma_map_error: if (atomic_dec_and_test(&info->mr_used_count)) wake_up(&info->wait_for_mr_cleanup); + smbd_disconnect_rdma_connection(info); + return NULL; }