From patchwork Mon May 4 17:57:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 6329131 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C32BBEEE1 for ; Mon, 4 May 2015 17:57:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31CAC202A1 for ; Mon, 4 May 2015 17:57:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A7F020266 for ; Mon, 4 May 2015 17:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399AbbEDR5G (ORCPT ); Mon, 4 May 2015 13:57:06 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:36100 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750887AbbEDR5E (ORCPT ); Mon, 4 May 2015 13:57:04 -0400 Received: by qku63 with SMTP id 63so89978059qku.3; Mon, 04 May 2015 10:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=bJr1+tcLS6lydmG576leqXMZC04scZynQsCRBpjBQXI=; b=TkBqdJdEM5cHX9hW9Ng42qVJuL71cy58IK9osfn/mWAn9EFuahctjmRQ104e3gzJJQ LIp97ji0SzP6Y38N0u6J1K6VgCjHtXBchE+k977nR5un4Zp9GrfefrZjMJSXLswPRQGw PlBJLATTLRNEACO+oWGs7QBVTACNizqU1oV0XEczeN0Ley2CQ/FgLs7b76nUIbiAGFSD 0czq+pTdkevYUBkxKNVzQ/dXgrc0qxGzfn6iUoefPSJexBqiJ2/luvreASbYBolqSyZU 8FI+3AipucVj3YEAvfsgE23KUR1fEUc6d3vwQNgjGdiln+3fuJS30dMs/pDgcSkFR4mv CCUA== X-Received: by 10.55.24.158 with SMTP id 30mr47516567qky.83.1430762224030; Mon, 04 May 2015 10:57:04 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id 97sm10226612qkp.39.2015.05.04.10.57.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2015 10:57:03 -0700 (PDT) Subject: [PATCH v1 02/14] xprtrdma: Warn when there are orphaned IB objects From: Chuck Lever To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Mon, 04 May 2015 13:57:00 -0400 Message-ID: <20150504175700.3483.57728.stgit@manet.1015granger.net> In-Reply-To: <20150504174626.3483.97639.stgit@manet.1015granger.net> References: <20150504174626.3483.97639.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-3-g7d0f MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Print an error during transport destruction if ib_dealloc_pd() fails. This is a sign that xprtrdma orphaned one or more RDMA API objects at some point, which can pin lower layer kernel modules and cause shutdown to hang. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Reviewed-by: Devesh Sharma --- net/sunrpc/xprtrdma/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 4870d27..0cc4617 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -710,8 +710,8 @@ rpcrdma_ia_close(struct rpcrdma_ia *ia) } if (ia->ri_pd != NULL && !IS_ERR(ia->ri_pd)) { rc = ib_dealloc_pd(ia->ri_pd); - dprintk("RPC: %s: ib_dealloc_pd returned %i\n", - __func__, rc); + if (rc) + pr_warn("rpcrdma: ib_dealloc_pd status %i\n", rc); } }