Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp542458ybt; Fri, 19 Jun 2020 07:51:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiM1ZaYcKTKjqaWjr4oQzT3d/mf5DvRKxKLTCD0KDRmxh/fVIu2ieTJcgxUZbID6wJq/lg X-Received: by 2002:a50:ec0f:: with SMTP id g15mr3771616edr.359.1592578280924; Fri, 19 Jun 2020 07:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592578280; cv=none; d=google.com; s=arc-20160816; b=L6ttsiznGtUFh/KpXAE94FM8gVyoFbGmz3g1wuRejQfLqvEsKqPbhVW1tXNpxOmstc 8Nt6SswU0TR1HOn50iKMB3ipQuCZQnZ7HPH3qluPq3oBq1ZCZedgCcuvb22Ta5Vw8yLn hxeko+yGd84oLw4TGn3w9nfHvLhzjp4suE+YR7p2vPONEnDa8wUvYt31r38925EV0+HR WW9B7Z0uQD+msZeNneX6NZVohZUez2ySxMeBQcY4FiNveVMcluH6gkX2vFWAAUqaelAq qJhq/+s6QqtUXk3qDjU5ye6y6Jw4l1a2lHL9L5cZCCRf2BuNipsyaCxujrWCFSAKmDoU aHXg== 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=+s6pkBRDM30YuGdJhldYKeWDIO48yG6flkbbQQFbzXo=; b=JnUPOhRhcYpf9J8wpDFfQU5LrjQmo1ShjwzWWjoieb64CaflWDFv4MjwN8tUXXMPje UwU3xIspp4q/azgMIifyEtktnAIh+KdbQxMTNM7fnNZmHzhfGBkrAE4sByvXwB1mQc9q kGsDctlK/fhgsg4wxPa65kmbEDVTVyXY5C5R9fmvN2PLoqr1U+C1ZMENNznrTzH6S5cN SXwq/rUiAN6Cs5H+uOmSa9CWx6od460wmQc1Sz5RV1tFDrdel4aT2M54d/eUy8q/F0tg 0YEvt/xK5mB1GwpmOjZBhVcXrJY4w3iF6tO1KWv/B33PKNE6wh/8276O9NyRFxEbz/Ln oIvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=cVyekK6g; 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 oj22si3873575ejb.115.2020.06.19.07.50.58; Fri, 19 Jun 2020 07:51:20 -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=cVyekK6g; 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 S2388846AbgFSOqc (ORCPT + 99 others); Fri, 19 Jun 2020 10:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388831AbgFSOqV (ORCPT ); Fri, 19 Jun 2020 10:46:21 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C88C06174E for ; Fri, 19 Jun 2020 07:46:20 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id b4so9102705qkn.11 for ; Fri, 19 Jun 2020 07:46:20 -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=+s6pkBRDM30YuGdJhldYKeWDIO48yG6flkbbQQFbzXo=; b=cVyekK6gNaex1l33w5CHjg7QMVi68Sw9rhx+fP+2dHuJ9VuuQAjQuvPC0embsAEdll pL39qxS6t4Z72V7EuzIFUxGRiUy0R9xd48CMucaUVTTfLG6KJuB1lp1lfDG99zhzwayW RiNI4sAMzD5UAnCVeEJWJkrrLXz2X5a1+EHq7MfcAf4QEvRW11cPPhA2vSJJXwgq8+AN wSG6JToEpWDGOJRIkVr0GSgtT9FzIJgJ3aJeeIbBu9wiiXvhrQHVX2R98vmzUHyZ8cjv lNeHlLryFxqhdOjBqQ+153TWRlnSTkOAXNDtxCU6bs6aX/NcBxp1dDa0Y7/0d+TcX9er bwfQ== 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=+s6pkBRDM30YuGdJhldYKeWDIO48yG6flkbbQQFbzXo=; b=neBrbNm/WRBh1E00NRTKZLyxyCiIMQwCgZbRoCTqKB1VYL0ZX1p35qkbDT4QLvnNfy YfYCWqoaeGZphazEDBr5xACsHAy2YcfpwOthKH99wkFZj1esgh1rcsLrmsAaWF4XC3Oa pwml7IBlyhBf/oVJ5pJ9jPKnH1cbq9dkncJtq2GBjERo4Mw6HabZFfFdzd2wheWDnzo0 vETR1+T178G3bfB4Erxy1qtle/ibDaRTZd9ps8sjVIk5AWFqsuGZ8BOUXImz6QcS1Exj 4FVEgrtx8KsIZ1p1/oZxYQpPmhKTg7APEdLJmU8inz8zo2IV+rMkL/hTZmCZcoDoPDTS +hBA== X-Gm-Message-State: AOAM533Q7A8/BOSx9WXSbwCug+P2/As8fTiBkpSs5b2Ne5ciCom4OVQE FoxQiy69G5e31xW5F5dnJ8WKrQ== X-Received: by 2002:a05:620a:205e:: with SMTP id d30mr3855514qka.450.1592577979603; Fri, 19 Jun 2020 07:46:19 -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 6sm6469489qkl.26.2020.06.19.07.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 07:46:19 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jmIHa-00AoSr-JK; Fri, 19 Jun 2020 11:46:18 -0300 Date: Fri, 19 Jun 2020 11:46:18 -0300 From: Jason Gunthorpe To: Jinpu Wang Cc: Bo YU , Danil Kipnis , ledford@redhat.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] RDMA/rtrs: fix potential resources leaks Message-ID: <20200619144618.GO6578@ziepe.ca> References: <20200619131017.pr7eoca2bzdtlbk4@debian.debian-2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 03:16:57PM +0200, Jinpu Wang wrote: > Hi, Bo, > On Fri, Jun 19, 2020 at 3:10 PM Bo YU wrote: > > > > Dev is returned from allocation function kzalloc but it does not > > free it in out_err path. > If allocation failed, kzalloc return NULL, nothing to free. You should re-organize this to not confuse coverity. IS_ERR_OR_NULL should rarely be used and is the problem here Jason