From patchwork Sun Sep 14 13:47:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 4901391 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2F55BEEA6 for ; Sun, 14 Sep 2014 13:48:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D340201FB for ; Sun, 14 Sep 2014 13:48:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15B2120260 for ; Sun, 14 Sep 2014 13:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbaINNsG (ORCPT ); Sun, 14 Sep 2014 09:48:06 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:36889 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbaINNsF (ORCPT ); Sun, 14 Sep 2014 09:48:05 -0400 Received: by mail-we0-f178.google.com with SMTP id q58so2838163wes.9 for ; Sun, 14 Sep 2014 06:48:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YreFk6biJv6isqE6V5szfw9GTK+ce/FiuMSOB+u9IlE=; b=iRO9d3zpdVZYfS8SQwCy8bwMmI4QEWlUpSZJzTDenYFxFM1CYVPvEyh4K3me5zJGTw QPuxJwqe3wq8aon4b5GHD2ht4Q+p8Qp6Xlgz5870dqIzWXmffdGtawg06oU3woO7OYSw 2AEVTOJ4EQb9Yyeo0djlPVs9xqkHcg29FSF5lUgKbXElbRjNLCiBlSXR/GZT8LO1u83n SjbdqpvmWoYYEH5xOsKrpGYjoHVycxFCtkWFPwdvqHT3MDFgfhLNLXopqt0eBBNCkBmS x4uY1mpfMDtjQGVhtrmBtCcbjDohnyvIp0/PmgwmTN70mBupYy9EUtEDi7yK/8w8nK52 oJHA== X-Gm-Message-State: ALoCoQmSKq1tFlRU34AiG5Rje5d5x9F4yLLMOszQZvFvv4GdpAvHo4M7kA0Hha116BlEUojU86cW X-Received: by 10.194.77.111 with SMTP id r15mr26644483wjw.27.1410702484063; Sun, 14 Sep 2014 06:48:04 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id uk7sm11224262wjc.34.2014.09.14.06.48.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 14 Sep 2014 06:48:03 -0700 (PDT) From: Eli Cohen X-Google-Original-From: Eli Cohen To: roland@kernel.org, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, ogerlitz@mellanox.com, amirv@mellanox.com, Eli Cohen Subject: [PATCH for-next 1/6] IB/mlx5: Clear umr resources after ib_unregister_device Date: Sun, 14 Sep 2014 16:47:50 +0300 Message-Id: <1410702475-28826-2-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410702475-28826-1-git-send-email-eli@mellanox.com> References: <1410702475-28826-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Some ULPs may make use of resources created in create_umr_res so make sure to call destroy_umrc_res after returning from ib_unregister_device which makes sure all ULPs have closed their resources. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index d8907b20522a..ecd3aebc46fe 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1414,8 +1414,8 @@ err_dealloc: static void mlx5_ib_remove(struct mlx5_core_dev *mdev, void *context) { struct mlx5_ib_dev *dev = context; - destroy_umrc_res(dev); ib_unregister_device(&dev->ib_dev); + destroy_umrc_res(dev); destroy_dev_resources(&dev->devr); free_comp_eqs(dev); ib_dealloc_device(&dev->ib_dev);