Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7484776ybp; Wed, 16 Oct 2019 09:19:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9gTG4bskUHCmZ7AuM6kC40QhtZ0P7LcGSlbxXvLF1Fa5fLni5iqxh46KCdRA0z+GFDBbh X-Received: by 2002:a05:6402:51a:: with SMTP id m26mr40026060edv.298.1571242773525; Wed, 16 Oct 2019 09:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571242773; cv=none; d=google.com; s=arc-20160816; b=F1FcZNclVovOsrW614s8sTAzW9Qqij6EXH5SOJxX/+/q3IP79nZR4m2OLwtQR/EkNM o/3bTTnUY84kEf8PUj0s2ozqTInYgDWl1mKoYT93xXf0jHD4muyrLFwiA8Z2MdKNhaAB wPhMqov5AOHYgchKq68Iudtq8rsfWoEr/uiyRt3m87Zlk9NTuTiiEeFPr17ndSnAEFvr aL04+x2VzV09JmCcxRYP29L+mceRabFPus3nGCr693OJz6zYeEk6YzSLtEjcS6OK0Oy8 m+YZPbos/CG/ff4tU9QrZvb6lk61jBMDEj2o/6mMGMQ6C7QdIXoA9M5NDHuBUuW7VAp2 DtVw== 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=BdHrLxCp9g5Df1l1kF4KftxpClGxEjwux4GL0qZITMk=; b=xB9TVesSjfR3lGbHCd9uuM/G0mUtgvMS+KDCL28r2jpjfznrBbjJiLvX35yxmw1iB5 bD2PpFXvzWKeOWFkW8lg1tWhk0gA3Y35AkVx+RPqsL7KXZCY/jozflW3ofg/+CkUGx1v UTAd+3/jwUjAqoZwPz42aXbFuYL2NYt/sB21Y+y/Yg10U+UqsM8db9Xzji5JU12HbhTW 0qeaQHtw2pfvRsf77bn0/5UTEqBPQcXfox+7usdD6LcNEDr4Hejm5Uc2Z4wjhHLudlyP Sq2W8lxMwhTxZLTQKk3rkD1Vxl5gyphqykGRFR0ulBrZzXB2N+Dp2FJj+AP1K2OiXGuR cfxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ozqy19Y1; 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 p10si15339824ejz.391.2019.10.16.09.18.58; Wed, 16 Oct 2019 09:19:33 -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=Ozqy19Y1; 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 S2392913AbfJPOSA (ORCPT + 99 others); Wed, 16 Oct 2019 10:18:00 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42627 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730937AbfJPOSA (ORCPT ); Wed, 16 Oct 2019 10:18:00 -0400 Received: by mail-qt1-f196.google.com with SMTP id w14so36285634qto.9 for ; Wed, 16 Oct 2019 07:18:00 -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=BdHrLxCp9g5Df1l1kF4KftxpClGxEjwux4GL0qZITMk=; b=Ozqy19Y1fdooxczI7Ku9sZKiDiw2Tzo09xfUi5VqAmCwCQnE1yloC5Ff6O6xeoQElh ePPycxWevBZl0/wV+5rDz4mEjHwKUcWyaYjeYAXvb5sIFnzSj3X/IykJT3bR61MxLxYY D8v4klDksNRvbW9uY8mV25Rcpkl9iIB+zXL/gD2787Ot+yqcHIo21FKUcUZBLl9iy10P WTJbdX2pWMLGXXKTLMysuScMa1Pdbf+yprRlhSKFUaLrkgwYYdtzBKZ1BHpDrwrC/GFG WwY0I4qmIkotff02z94zPb/lgT0S617pkIsXDL/qWjoNhxf3Z35O8q2556IV8gV59FgA //gg== 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=BdHrLxCp9g5Df1l1kF4KftxpClGxEjwux4GL0qZITMk=; b=IXKC8pq8t+E+0FFVRPuU+bCBzG+dobvudKSdxnci7PUBUpDpZq7OgmCfP8VVJcxXBY fdS5Ng2oX3CgjrPCKGef+54l2J5Z8aZequXpgoF0XNdc5fuZ0C0s5OEexe1JAElXPbvB J1bUNd3SnGjE5UAfLtCJ0N8nlQW3hofpnalcO5+Cx4/4R7oZ+gOXst90b5rlz+NO/MwN aeFYB5vG/7GEPz7xEXE2wOtTqxBST8DTtxHfWVkaMhyolHGLjOSePkO/tQGkr6QRX91D c6JFq+DJqRem5euABwQpcAz/8tLLeVJO36iZLf6S/LE8ffSUiiJW7/kV8gCkvaNTq/PH jHTg== X-Gm-Message-State: APjAAAVDou80TXnWCnt9UHJ/KsF6c3c6in2Z6RtAK1g5PuoNSWzZ8k/v 3smh2yjxHe+2inCAFQt6G8/25I0= X-Received: by 2002:ac8:6ed9:: with SMTP id f25mr7129373qtv.207.1571235479387; Wed, 16 Oct 2019 07:17:59 -0700 (PDT) Received: from localhost.localdomain ([66.187.232.65]) by smtp.gmail.com with ESMTPSA id g31sm14925361qte.78.2019.10.16.07.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 07:17:58 -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 3/3] SUNRPC: Destroy the back channel when we destroy the host transport Date: Wed, 16 Oct 2019 10:15:46 -0400 Message-Id: <20191016141546.32277-3-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016141546.32277-2-trond.myklebust@hammerspace.com> References: <20191016141546.32277-1-trond.myklebust@hammerspace.com> <20191016141546.32277-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 When we're destroying the host transport mechanism, we should ensure that we do not leak memory by failing to release any back channel slots that might still exist. Reported-by: Neil Brown Signed-off-by: Trond Myklebust --- net/sunrpc/xprt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 8a45b3ccc313..41df4c507193 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -1942,6 +1942,11 @@ static void xprt_destroy_cb(struct work_struct *work) rpc_destroy_wait_queue(&xprt->sending); rpc_destroy_wait_queue(&xprt->backlog); kfree(xprt->servername); + /* + * Destroy any existing back channel + */ + xprt_destroy_backchannel(xprt, UINT_MAX); + /* * Tear down transport state and free the rpc_xprt */ -- 2.21.0