From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FAD7C11F66 for ; Tue, 29 Jun 2021 06:40:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E881661CC7 for ; Tue, 29 Jun 2021 06:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232105AbhF2GnC (ORCPT ); Tue, 29 Jun 2021 02:43:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:37656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbhF2Gm7 (ORCPT ); Tue, 29 Jun 2021 02:42:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8983261CC7; Tue, 29 Jun 2021 06:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624948833; bh=uiM4ZLlUWZ7h4sImIXL++IvKwJZNxgmEDXyACS1QTvs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j6zrxtJXNmcJ0vPKYlN/1Pzt7zNEI2j40Jkd3N/MyETUJ6fx6rpLOVJ2FrzVz/WGM CCXlSV7ex+o2UyH+HaEkFDYM6/B5a66SO7X/E4KuUo8PztoNnCc+QEE0J2Vd9PoFyc AJyZodXD8XqUNmvakICvix3VewBfBAFnJ80eDaYG5g08jvXpAy3cMQjFZzW/vfExmB 5JTS1GDI0AivZ/qubH9PWOPAhto2D71jMUgZ7PSlCSdTCxi7mVo6SI9e3NNBC4EkLs dUoDBA0XFhu9IE5871dUnmiBMTLI3ZPOx9oH78JdnRZWCKmyPZ9KeS10O24XvvpjD/ CL9MjO2pvR7yA== Date: Tue, 29 Jun 2021 09:40:29 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Doug Ledford , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Pavel Skripkin , Shay Drory Subject: Re: [PATCH rdma-rc v2] RDMA/core: Simplify addition of restrack object Message-ID: References: <20210624174841.GA2906108@nvidia.com> <20210627231528.GA4459@nvidia.com> <20210628113813.GA21676@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210628113813.GA21676@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 08:38:13AM -0300, Jason Gunthorpe wrote: > On Mon, Jun 28, 2021 at 08:22:45AM +0300, Leon Romanovsky wrote: > > > The previous code didn't call restrack_del. restrack_del undoes the > > > restrack_set_name stuff, not just add - so it does not leave things > > > back the way it found them > > > > The previous code didn't call to restrack_add and this is why it didn't > > call to restrack_del later. In old and new code, we are still calling to > > acquire and release dev (cma_acquire_dev_by_src_ip/cma_release_dev) and > > this is where the CM_ID is actually attached. > > Which is my point, you can't call restrack_del anyplace except the > final destroy. It cannot be used for error unwinding in these kinds of > functions ok, let's remove the controversial hunks. > > Jason