Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp900159ybg; Fri, 18 Oct 2019 09:01:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKBtU5111+jyw65NPHy+uwYYvJ3F2DWFQCO728K/zjs6/AiO9rpUIpYsV87mSSSvXfrCtM X-Received: by 2002:adf:e74b:: with SMTP id c11mr8153619wrn.250.1571414482577; Fri, 18 Oct 2019 09:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571414482; cv=none; d=google.com; s=arc-20160816; b=ur0Fkfbperik4padwUW89byKlBuU4CgNHPM+esY0EUtEhNgeX3g0HRMQaYnv9ZRVYQ 3ficelrsJ22u3y0Js1xFIlT9cpv0cWcHgkujM7Au11CIglnsyzG8jFc2OdtJ0v0WDfnM EbTM8EECAkl3c7EF8gmbFmh4e46Nr3R3kUQA1anQp15ydzjxwZ2zjLQ/DxFvcybyXwbQ ACvJTQZ0cNvNKdTAE+rrO4GiqRWyI36a+BIBIKEZ2jYnRZF10K/29p4UQIvKLR5wiRCq DjI4KJk5lael/X+UnCgx3Sme1jala6O0Gmxr4raIDLf4eCjaPENa+8rR5cQxJc4ScJ7A 7hQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f4CXZMOsoJLn43utTVJO4GHlgyGENzJaiSYFpXxAT8U=; b=i21lm78LU/Vy8539eL0ZQoIIb8CNUxyGtdgEOF0AoQ1PNht9u7SRMfKLW6aS1XguQZ al40jlTMRav8qzL4Ri1MWYdv7Fe+HUOIieNGAcOR55MqyNK5Qv2n4YJBmeeFtuTHYQyE o6yYboaqCugjf3pN5AWRk2I1XiFyojoV3vU3esZP+WStb82HXIZtKn1F6/VEwZ3zmoun iT9rhlg++hDAwb0lPbUgD6Z8U223+5L00m6l3bIMwtgjLk3lOH609SnxO51p3MZ7ChGO fORvbt0EFu7jt7KsVqKutpVsjbg4TMVqVSTjebomBCpaXFswjVZU232D8ZfHkULKxnaV xQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nGV+SDNs; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si3640039eju.46.2019.10.18.09.00.56; Fri, 18 Oct 2019 09:01:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nGV+SDNs; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394098AbfJQNFy (ORCPT + 99 others); Thu, 17 Oct 2019 09:05:54 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:39275 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390908AbfJQNFx (ORCPT ); Thu, 17 Oct 2019 09:05:53 -0400 Received: by mail-qk1-f196.google.com with SMTP id 4so1762149qki.6 for ; Thu, 17 Oct 2019 06:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f4CXZMOsoJLn43utTVJO4GHlgyGENzJaiSYFpXxAT8U=; b=nGV+SDNs6c7kqY5bYEYi1+P1IM+QIeYMu8M7yIFHipJ4ndTStOYuOmDOSeU75VgJG0 OA25zNEXJHHpQj6AYfRANB8Qy4OMuBoUbGYpahEKR4BZPOnv7WkfAf1BSRAedWWCyskj jTEWL6qLep64ZMtZOtZB37bRvl4f5naabBPfS+Of2cvzyVunmDM+OD+lIte9nL3YHjtg Jd0asTydgEwF+tAw373lt1IkxQId/3YbrMlN7BFuhen+MeabQFq2wmbt4t1D1pJ4sS+A xCRxHdK0CQOebDTL+kcYCM4RjUQ+jTIFNPxqPO2aZ1dgQwCIseQ2HxYg6TEyymbTssVG sRiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f4CXZMOsoJLn43utTVJO4GHlgyGENzJaiSYFpXxAT8U=; b=mxfCFkEDggeSVu8g5Z6qG2ujlGUBL9AR9yZBovoa5Q1Evpk4SUIgkpXqOyv0mDzOeT GjLwpDTxVNZHRuJZdai09ATM8ZUJZ7HepgpJalqS3ULV6/bapUdJg6ZVcBWcjjdru6wP Wy9TWO0/1EJYaHnuZ0yZh5blYzxfzsCElZ+IQ2aUkCZcDV0Ll6VFkWljDwN/KKU29V/I qA/169p9WgCQ5swHFnOhYDFOgMqCwEzqimIlyS2efCad+4kMU/kjLl1gIkSmUR4DcG7S VT+Cce6w2vdf++bq+sKK6IbVEYsjvD8TyOWml7XzRGJAG8aiz+aImwOuvqbZgbIglZXt 8UrQ== X-Gm-Message-State: APjAAAWqv8ooLmI5sXJ3eUzEEzjXC6RM3nvmfdy0bQWz8p5m9PEpnRxq xfFQQZ16Nga0O3JMpwIndDu40cw= X-Received: by 2002:a05:620a:b07:: with SMTP id t7mr3079994qkg.382.1571317552337; Thu, 17 Oct 2019 06:05:52 -0700 (PDT) Received: from localhost.localdomain ([66.187.232.65]) by smtp.gmail.com with ESMTPSA id g194sm1326648qke.46.2019.10.17.06.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 06:05:51 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Cc: Neil Brown , Chuck Lever , Anna Schumaker , "J. Bruce Fields" Subject: [PATCH v2 2/3] SUNRPC: The RDMA back channel mustn't disappear while requests are outstanding Date: Thu, 17 Oct 2019 09:02:20 -0400 Message-Id: <20191017130221.7924-3-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191017130221.7924-2-trond.myklebust@hammerspace.com> References: <20191017130221.7924-1-trond.myklebust@hammerspace.com> <20191017130221.7924-2-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If there are RDMA back channel requests being processed by the server threads, then we should hold a reference to the transport to ensure it doesn't get freed from underneath us. Reported-by: Neil Brown Fixes: 63cae47005af ("xprtrdma: Handle incoming backward direction RPC calls") Signed-off-by: Trond Myklebust --- net/sunrpc/xprtrdma/backchannel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c index 50e075fcdd8f..b458bf53ca69 100644 --- a/net/sunrpc/xprtrdma/backchannel.c +++ b/net/sunrpc/xprtrdma/backchannel.c @@ -163,6 +163,7 @@ void xprt_rdma_bc_free_rqst(struct rpc_rqst *rqst) spin_lock(&xprt->bc_pa_lock); list_add_tail(&rqst->rq_bc_pa_list, &xprt->bc_pa_list); spin_unlock(&xprt->bc_pa_lock); + xprt_put(xprt); } static struct rpc_rqst *rpcrdma_bc_rqst_get(struct rpcrdma_xprt *r_xprt) @@ -259,6 +260,7 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt, /* Queue rqst for ULP's callback service */ bc_serv = xprt->bc_serv; + xprt_get(xprt); spin_lock(&bc_serv->sv_cb_lock); list_add(&rqst->rq_bc_list, &bc_serv->sv_cb_list); spin_unlock(&bc_serv->sv_cb_lock); -- 2.21.0