From patchwork Wed Nov 8 16:18:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10048759 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 5C7BA60381 for ; Wed, 8 Nov 2017 16:18:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 520572A6FA for ; Wed, 8 Nov 2017 16:18:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46DAD2A707; Wed, 8 Nov 2017 16:18:40 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 C79842A6FA for ; Wed, 8 Nov 2017 16:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbdKHQSi (ORCPT ); Wed, 8 Nov 2017 11:18:38 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:54884 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752143AbdKHQSh (ORCPT ); Wed, 8 Nov 2017 11:18:37 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Nov 2017 18:18:34 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id vA8GIYBV010591; Wed, 8 Nov 2017 18:18:34 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id vA8GIYdV010491; Wed, 8 Nov 2017 18:18:34 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id vA8GIYZS010490; Wed, 8 Nov 2017 18:18:34 +0200 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, majd@mellanox.com, dledford@redhat.com Subject: [PATCH rdma-core 2/2] mlx4: Cleanup upon fatal in the destroy flow Date: Wed, 8 Nov 2017 18:18:17 +0200 Message-Id: <1510157897-10384-3-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1510157897-10384-1-git-send-email-yishaih@mellanox.com> References: <1510157897-10384-1-git-send-email-yishaih@mellanox.com> 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 This patch handles the cleanup upon fatal scenario in the destroy flow. It follows other objects in mlx4. (e.g. QP/CQ/WQ, etc.) that were previously handled in the same way. Signed-off-by: Yishai Hadas --- providers/mlx4/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c index 7ecaeb1..042a8e0 100644 --- a/providers/mlx4/verbs.c +++ b/providers/mlx4/verbs.c @@ -1542,7 +1542,7 @@ int mlx4_destroy_flow(struct ibv_flow *flow_id) ret = ibv_cmd_destroy_flow(flow_id); - if (ret) + if (ret && !cleanup_on_fatal(ret)) return ret; free(flow_id);