Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp149597pxk; Wed, 2 Sep 2020 17:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX+oIjwCqe3hs5768eIKKjEzlZw3nZDHqquvVRKUJGKRF3Z1mb9ppMv4pI7jVLkc+rmf2Y X-Received: by 2002:aa7:d705:: with SMTP id t5mr486376edq.2.1599093279814; Wed, 02 Sep 2020 17:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599093279; cv=none; d=google.com; s=arc-20160816; b=hZ3yJbngo9Gjx3NR2aIMQPj/LFcDmSZ/HtO+XVvXs59xi83GQZx7ZouuOb+jQpfKFp CLKX4jrGQSsI2eZZ+YMTBhCnn49v834CidTMFwoucSO6IzVPlUf8A9xPNcG3DTCrWEQI d36bL9yM2ELA14tFRm0rMQOKArpHdtl96Cx6PpEQVN76JGC23m67TGrLdDPpVxewmBwv XnupWHX6BFtam5qc/GIxspR0RNtpJbLqgpEacVnpM48k92HLawUe27q8IyQE0jtb4S/o 33HK1Hzue5cwgGwUmyNgyEvpM/kiSj92wh4s9dThn7rlVId1sQ3KuewFrdoFAIp9FuXw TNSw== 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:from:date :dkim-signature; bh=hzENZHHDagYkre5YmeQJF9VEGAF2lTzkp/c1bdh2+UM=; b=q4Rw17QivJp0mjS8bG6rXJ63Dd8oCNk+POTOnbb2IP5ySIu2oUxpM4k6p8INh+nvpq kONWGHK4hb0qExDkzZpRfGDPO5ZnMfkOz31FuCFswzOE7v/hPkCqFGM02Yto8YCXEVjP 5kafafqNNm/FGFnifkOpzOmDfAuD44KZPENEXS1OsYj6F/TpzD7e4XJ2uDRq+31QCZ82 Lypre4VEWTMNVkBGLrNIdsYGIUpGEddRQMgD8bCZL3sFcJaaF8sEA8Nqj7h7u+0N+vDF SSbtDt1XVs1fWhdC9ErW9Z6wAo2+7urndZP55Dp0jc75UMHzY6L1lsD+diqs+knK+6rr M2Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=dmlFEhn+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si514483edt.342.2020.09.02.17.34.16; Wed, 02 Sep 2020 17:34:39 -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=@ziepe.ca header.s=google header.b=dmlFEhn+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726922AbgICAct (ORCPT + 99 others); Wed, 2 Sep 2020 20:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgICAcq (ORCPT ); Wed, 2 Sep 2020 20:32:46 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436CEC061244 for ; Wed, 2 Sep 2020 17:32:45 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id n10so691053qtv.3 for ; Wed, 02 Sep 2020 17:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hzENZHHDagYkre5YmeQJF9VEGAF2lTzkp/c1bdh2+UM=; b=dmlFEhn+Ayo3tZ9GtT6vUzqpnrbmFB1gKVk0X4k7lm4hoPRQiIxAPKFnm/k6vPRA6/ 6r3AcZ+TUAwFJudCNPdYXM/riwzqY27zAzwSgriZdDWGfrO4284ublC4MUN/raTSDxz5 4OuuKypmHv55w//+HmFFICIgGE3MUvHyWySXMkupUdNVMaeMejCRrdQ9LL9f37M0z8hW 0imCFioGxYQNR66RkTNzkfb0Bi8GPXX/218PD02sX/iN/kYkSb/LYgRv+XqPp9WztFuv FIIaPX/CCee4ORcABHiQotgBvVWNb9O/FODqrlGsckUA15PlA9Ct+eaCo/WDAEF1DvSG piWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hzENZHHDagYkre5YmeQJF9VEGAF2lTzkp/c1bdh2+UM=; b=HXlHclpR8u/sWGGUza4+cXAibrRrrlLy9kq2VzuR5w/YKnyRaq45qTsddaUo8ZzPMq 0Mk9Y4Xm7PIJq5Z2Vee/TRUCP//oQ4vjp+UzXgtfDo/O/YR2zeXCGvmvNjARVIucO2Kk aHA8PMM6qg1k7jHQbn+iBOXwb5C7OsBXA3brrHdjQ7ONu/PE19U1M56IPudFqWq5gIcg OYcpQg3sacKlefoabccGPHCtQqjiT1nz4goix3BN02hpSxrDgYiTRBrU3iOrDzJxdSEe J2NlpOK2+GRflAbTiykvtozFVh6e/CTKOCZ8gE3OSSvwrSQLpMrhYJSGTWaxrH/USStT U6LA== X-Gm-Message-State: AOAM532XDv23Fkjgkdxa86zSyEdllwzw3HtImZ85i0V8M2AM36+qGx4v adLymmWDi8XJg5QtRU2OLEYRZw== X-Received: by 2002:aed:2b63:: with SMTP id p90mr848170qtd.71.1599093164265; Wed, 02 Sep 2020 17:32:44 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id 196sm987777qkm.49.2020.09.02.17.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 17:32:43 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kDdBC-006Dty-Mv; Wed, 02 Sep 2020 21:32:42 -0300 Date: Wed, 2 Sep 2020 21:32:42 -0300 From: Jason Gunthorpe To: "Gustavo A. R. Silva" Cc: Alex Dewar , Doug Ledford , 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: <20200903003242.GL24045@ziepe.ca> 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") Thanks, I fixed it up Jason