From patchwork Thu Jan 19 21:20:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adit Ranadive X-Patchwork-Id: 9526947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE11160437 for ; Thu, 19 Jan 2017 21:39:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B076F285AA for ; Thu, 19 Jan 2017 21:39:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A51822865B; Thu, 19 Jan 2017 21:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25BF028658 for ; Thu, 19 Jan 2017 21:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752239AbdASVjR (ORCPT ); Thu, 19 Jan 2017 16:39:17 -0500 Received: from mail-bl2nam02on0074.outbound.protection.outlook.com ([104.47.38.74]:2690 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751637AbdASVjB (ORCPT ); Thu, 19 Jan 2017 16:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sKcXRrwQuzY1akju+IyQmkYp9d3ScssP0QkJp34igcA=; b=SGRPHCGF9xGa6Hwo5/Aao2Et4XhpdkT0Lra/i3SACdx5y1AlaPxjdYiVZEqvOFG1lXHepdn4+qycEF2e7b6QhfCZ/n3JnFaLImz8UA5kLYm8cH5dSO2fpppMNZh33SvMrm9OKbUCxR0E6aeVGPWOTQGbHHZl50RnQRWTz7uY1EA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aditr@vmware.com; Received: from promb-2s-dhcp95-136.eng.vmware.com (208.91.1.34) by DM2PR0501MB843.namprd05.prod.outlook.com (10.242.115.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.6; Thu, 19 Jan 2017 21:21:11 +0000 From: Adit Ranadive To: , , CC: Adit Ranadive Subject: [PATCH 2/2] IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path Date: Thu, 19 Jan 2017 13:20:40 -0800 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: CY4PR13CA0039.namprd13.prod.outlook.com (10.173.156.153) To DM2PR0501MB843.namprd05.prod.outlook.com (10.242.115.149) X-MS-Office365-Filtering-Correlation-Id: 92807eaa-e8f1-4e3c-7f43-08d440b117ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0501MB843; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB843; 3:MnRBcqaM8pvinC/4C9ssm8rNv3C48tsMjtbc+91xtdqE4GBt0YFUwy6m3StFurJzH6VWnANmi4wGUqV5JJocF+ZbS/hMBzTY0n5Fptw+V6k2HEQ+ZjvbuBAeUBHd8z8DetPsxJ9sQteXfY8NHwGtleDdwjTMXIWrAHMZf/UMOHQTwpt5VV41BgXkGWTMNNBlA16o3F1KUPlYapFDXbtvQAilvb9uNBu6ZeP5QP2RhkS4xQSw6P11kS13a+IYcKfUpdvRm77/ZIV9VeaHd1J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AveDnVTjToI3SMi2Pq+TXvKSKPZdTqfzbMZlrwzkVnHUn6a6q3BszmSF5c+rvn4DvRJhwNkp3iVj+xQtM118zNZam5SkuXlHAJnqdkG1wsSjixKFxRY+F2ZclCLDduX2Wf4L9j7PDyCq4h/ehT3zXONQGKu0sVWuTD0Y4kZtZa7GJEKSHqhhKbpn7EIMcEf1x5rvT3wKiO/r/g3PuAROplaLCcN/TtbM1oybINrT0mMGG2LbaUmdz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:DM2PR0501MB843; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0501MB843; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB843; 4:BXYoACrUs0vPxuaiFQLs8v83Eb7ZKOOI/lL24vAFgr7yDtCrJq7Z+PYWrtQuZB49nEtnZgH+rgD5sBX5FvmjZT6ZJuvN5M5u2JmDuHj8xYbEbXt2reJHJkfiXhzdrI6GjZLWokpJkKGcfx3oQfKLUquHSSrk6XVOzWDels5d/xR1N+GgmeTaX/8bCG5ZDm3zARE/OdCC/NoDl0NkoiG1WDeWxiOhmxDnAQ9Ta1lOZvGgfGcl0N+j4zasCifwjg/vWkCZmPAAAJDEtm+BFChb1ad2mlKt0e2gLKEWZzBT9vnoL8gCYhNpU8SZckLh6L+i3diAI3JTnbA+OgNcb4AsiL4IHxHsBoNMQclvlD3iaMjAxjcNeqmUdiOTCc+Jwh/szrPVLCUXigYhY0lLCxniki7kjsqcqABAn9TcIM4vtA8l42kAp1IpxkxXsD1H/ZIU6QUwKARDBitNXb/htBu8PF0+0NkbvwRrDFjWeJEe3R/8nrNo+rPntbnBFhDQZz1+jzJaN3z5JnD+Imwkjuop5ougshmsXpSSux6gbDVZaLZZ+D/O0v3zvnVVn65zQgy8xXpcv9gzVigFjNd6Q8NaBzyyPyfLWlcdBt6Ps20fUZontfflwYQFh5NFxcXyf8rz X-Forefront-PRVS: 0192E812EC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(107886002)(50226002)(50986999)(33646002)(4326007)(76176999)(5001770100001)(6116002)(97736004)(3846002)(81156014)(53936002)(48376002)(66066001)(4001430100002)(50466002)(8676002)(92566002)(189998001)(5003940100001)(101416001)(36756003)(118296001)(25786008)(38730400001)(105586002)(68736007)(106356001)(86362001)(42186005)(2201001)(305945005)(7736002)(47776003)(6486002)(81166006)(6636002)(2906002)(2950100002)(6666003)(6862003)(5660300001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0501MB843; H:promb-2s-dhcp95-136.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0501MB843; 23:uBPehzB3sPFDW9X0GDzBbx2DZHBA0RH/RDo347ld?= =?us-ascii?Q?m2FiT92Cjg+v2oQjAagq+Nb4t5Xm24RB1qY+AAbF7/Ra5ugLBkfRGu9szs0q?= =?us-ascii?Q?dINQRnRkCLAIrEmT7ekCzM7Z1Kpx/C8tskOEO+6vQjtJ4wHXHhRM6Jm/zhd3?= =?us-ascii?Q?1XjgBLVS2iX87B/wM5OJMz66+9j5SQbOPd0X9u6srOHW/Mcvn5Fvbfz6TNZ/?= =?us-ascii?Q?p181UMwMhWnQuzxZYMJlx+0Xc+Ij2hX2n14JWT2Lx+pa5A1S7I8hHpttz0E4?= =?us-ascii?Q?EZZf6KLWwcsp9N8NaVglkrqgnuv1M9CWEmRcUHpeER8ajEe48EUyDmPXiC0C?= =?us-ascii?Q?ILs0SArKW7/r+Nz8exUI9yFrgXje6saw01P6k8+cG/nk2RCrj+xR17RpmYvM?= =?us-ascii?Q?5Nnw8UH0ZhrKWnocz4R0G+3FMZAEeGK8ULEjA5u2fYKVNtmQRev8Bl2cg1gY?= =?us-ascii?Q?6H+88mVvIRXKnoxxAAAlnlJueb+TxPl719xxYkuGZ54USf80ieXkYuS7EUki?= =?us-ascii?Q?RIiw6FLjam9meAkLaYNshq9MVnzepz2kCGmNU674oab3B1Vc/vJdHBe4MUhU?= =?us-ascii?Q?ou69DJFM7qQ1MjCAmYB2YZANI+qd/mvdCMZ4rkj1r124lr26cKo3zI2jBFiz?= =?us-ascii?Q?gpMgkWdvUqvABHZJyd82vSUlryZoSa7K0mILEDeUOW5cDCDFIBSrbXaAKjCT?= =?us-ascii?Q?pVseDCr88enHORDIwIBt429KtR7zQM7vh+3oAuaz1bRtXk8oxfLfAOe7SUuO?= =?us-ascii?Q?HlyvgnwHj4wRyOyGkVgveLmvVnt6DaUawCUnH37e7E8r7uIRtb9X2Y6r62p7?= =?us-ascii?Q?I3X1h7htagKsdlUllvIrkBlX1rJwfJzS7Hnj5QkSJZ4nYjqiaiCMgJ3eLBPa?= =?us-ascii?Q?GCfRssAZEEJsT220AO7NKP8XBojc8fD9LwVR+JvUoumC6iMVZsP2sMfry1Ay?= =?us-ascii?Q?4YsEmQ8yRaYWnIEQWXKbeKR1cnC+gJMBgcc815lGGkn88mqvvNnX/2AYUrMb?= =?us-ascii?Q?8St/jkvObRiFWZ2AIALNcXrysjVMtKt3QCKiWf1lhRG0yzBfDiloVeBNMimW?= =?us-ascii?Q?j6AItLD4Sg9DX+0Hr+0Bkw41NHE72N7pgUNYsiVq+mcobH82ijky+ESKH8BK?= =?us-ascii?Q?a9Y9A/JEme9ApRJANkMYqv9gSH9i1n8uKTrm+sdZIqmxycp2ysrna2Qbm3y4?= =?us-ascii?Q?6vx6dtjruSPQYcJjdyMP5w8SR8dJUCnHcIiy?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB843; 6:Ref894pyKt4Gbrn8kh8dZL8VP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AGcGa5NvBrNFnCTif22SSScbLYoVekC6A7K+TElTowV6Vp4UKbY6g+2LsUc8TdIwNrpzubEkgaGoYAq5HexLvd7E8horDiNiai/anQzhn1S/yiAjvWd83UWa0pnI1afGliZz1O/cT/XQaE6dQ9r2cNbmWfd1RIEcjA==; 20:5uo+3W92jlNEVdEZ9Sgtsc8OdJwcO5jGuEMDglMM/9HPtJCeRywuFrEzVh+Z6xuTAs5Uxl1lowTEZiIRb5z+vhDYD1ZG7JYy7L3vtZ9BejdItkyn+zc/LtTwInt4GrTecnwj4EnIENwVTHtE7tCLTcwZRVl4tgClLU7r7+jJvKc= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2017 21:21:11.3316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB843 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the interrupt allocation failed we should start freeing the CQ rings rather than unregistering the netdev notifier. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Adit Ranadive Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c index 231a1ce..bd8fbd3 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c @@ -1029,7 +1029,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev, if (ret) { dev_err(&pdev->dev, "failed to allocate interrupts\n"); ret = -ENOMEM; - goto err_netdevice; + goto err_free_cq_ring; } /* Allocate UAR table. */ @@ -1092,8 +1092,6 @@ static int pvrdma_pci_probe(struct pci_dev *pdev, err_free_intrs: pvrdma_free_irq(dev); pvrdma_disable_msi_all(dev); -err_netdevice: - unregister_netdevice_notifier(&dev->nb_netdev); err_free_cq_ring: pvrdma_page_dir_cleanup(dev, &dev->cq_pdir); err_free_async_ring: