Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp396010pxk; Thu, 3 Sep 2020 02:36:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAu9onGvc+3u2i5JKeFLxOHV7amTPnBjDlJzVqBAT4y9CWUI4G0N1Ith0/mWkwO7UMlQ2d X-Received: by 2002:a17:906:6c5:: with SMTP id v5mr1150238ejb.323.1599125774704; Thu, 03 Sep 2020 02:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599125774; cv=none; d=google.com; s=arc-20160816; b=fvwqybgeGJ06+xiY2C5SVYfBqDnNarxluhuoDAnSgatdKx6tPg0AZ+e8iZ6AuKC+xY 09aA+jm/8GuLAV4twnFXuM4rm4mQryJlhZLFwjUyGO5VT7SxQeupooEo2yHVVJKUowgl 2uycS7WT4PDLJo4dUNHH9ZrZKlwckKfHkVKK/S/aIh88DvBGQPZE3t/E0jmZt14+J6Lb 9hui7o6cUac2npehFIQYnLbQfUs0A3Ah5rLypx/H0QM3/z6Mi/iLd78g5noHeFzKIEXp /p+Z58D0tpTc8vGlTdB4b4e4oQUPbvF/dzeNBspUvBpPSN5KTsUMheG1RZ1bvyVeIpbx VZkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=YmN6TYlQSwbm/wl1f5Jflst3Mjgwzhs4CRceNi7GnDQ=; b=UtL7hz3nclStNj46yrk6uxW0gW6tjqFZHkTyLzDauyFm6YnzmIjhrhTVSsZzMY3uSg 90EYROdwlSxEmwAdLrlJqHvwKr5SS7pKihVGX55oBezqyjbuvEX5WgWOqDzRHhvjGYUO zr4Q0iBr5tU+TIjf+mFANRVVPMYehFmGXP8ECQw/Hd2mkQzCv5krVAZppWp2uE0z4CCX N18IoMsmKZZUa/QwVs/eU1ZPO3KBM87ac8RswfphyEB45XPoQd8AtJiifnUavjS9horO gSZ6RwVLU+V1AR+/pBynbKivfxO8TY2V0bX46ml1WWNAKpoNQa1KApTzxTkCleAY7efQ 3IIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ohCM+ip2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si1302047eds.582.2020.09.03.02.35.51; Thu, 03 Sep 2020 02:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ohCM+ip2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727989AbgICJfK (ORCPT + 99 others); Thu, 3 Sep 2020 05:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbgICJfJ (ORCPT ); Thu, 3 Sep 2020 05:35:09 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC01EC061244; Thu, 3 Sep 2020 02:35:08 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id v4so2163118wmj.5; Thu, 03 Sep 2020 02:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YmN6TYlQSwbm/wl1f5Jflst3Mjgwzhs4CRceNi7GnDQ=; b=ohCM+ip22BVbqXf47OCWm47Nucq2P7yWHYLgqXl6cWN4Ap17kV1B9BwEojfKVQUD3c lbtr+AwWpMYU9NFOcwzSLKlFeWU51tPiCfkWTUaXuMykeDkyeYjylbLGK1W4R6I9Bo/F EW8UUJcWYcF3ioXQgbhTG2tTnJweTqvwZ3x1EpGp0Fkfn/rbYLl5+5wmPGxX6br9f/pI x64CmyHNRo4yZRKk1eKKy1hRoXaV/H/hjwKkUJZH/uMJsRW1EKrBh2qjFMvayxlT44l8 Z0FTg393wkWA6oU6rHsBI4AkSFLLf1Hv6dmsaxxnKyWiMuGehk2Gn/nkBLlQOTlvimsk pzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YmN6TYlQSwbm/wl1f5Jflst3Mjgwzhs4CRceNi7GnDQ=; b=Zt1tMkWxisdKwLMudiGVN9EriYeGzyz+JdS4Tn8Zrw7DfnPPGfYYIt6PSwnALT2ZI6 wWBOGniFCPz5nzkj4984jjPdDsWLZGhNgLkzgW7Jt26AmNASAWQ79wVDPwbNbDAyB7VP OO0j70Fd8DVSrosL46odar8X89RtG22oh/kFTpx3JxvCdlZc7S61NWCJejBneOCarfbH vzrewjHSSYeCmpnJLMvFBxeoZ4wWcJc3w3R6CFPH8bhS+Jh7HzS27zIQdaAhNUJDYwfH S/20IGxrTSOaEAVfOEGc79rSlwUA7GLU5S5mXvanNSYy5iZ8FTVTqPwkUkj0h+gxg9qL Ixaw== X-Gm-Message-State: AOAM533Uddisa8GEU3WEkxBIVTk3SA8llzJA1bKUU90vKzu8fLPw3veQ swrfuT5TueBxDDhDP17YYDI= X-Received: by 2002:a7b:c38f:: with SMTP id s15mr521509wmj.16.1599125707468; Thu, 03 Sep 2020 02:35:07 -0700 (PDT) Received: from medion (cpc83661-brig20-2-0-cust443.3-3.cable.virginm.net. [82.28.105.188]) by smtp.gmail.com with ESMTPSA id e18sm3515525wrx.50.2020.09.03.02.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 02:35:06 -0700 (PDT) From: Alex Dewar X-Google-Original-From: Alex Dewar Date: Thu, 3 Sep 2020 10:35:04 +0100 To: "Gustavo A. R. Silva" Cc: Alex Dewar , Doug Ledford , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] RDMA/ucma: Fix resource leak on error path Message-ID: <20200903093504.ita7taa67a6x6k7p@medion> References: <20200902162454.332828-1-alex.dewar90@gmail.com> <83132be0-a33b-ab7a-0da9-cc5c9398d0d4@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83132be0-a33b-ab7a-0da9-cc5c9398d0d4@embeddedor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2020 at 07:34:26PM -0500, Gustavo A. R. Silva wrote: > Hi Alex, > > On 9/2/20 11:24, Alex Dewar wrote: > > In ucma_process_join(), if the call to xa_alloc() fails, the function > > will return without freeing mc. Fix this by jumping to the correct line. > > > > In the process I renamed the jump labels to something more memorable for > > extra clarity. > > > > Addresses-Coverity: ("Resource leak") > > If you are using a public Coverity scan, please also include the Coverity ID. > In this case ID 1496814, something like: > > Addresses-Coverity-ID: 1496814 ("Resource leak") Ahh ok. Thanks for the pointer :) > > People that don't include an CID is because they are using a private Coverity > scan, so it doesn't make sense for them to add an ID because no one but > them have access to that scan report. > > Thanks > -- > Gustavo >