Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3764212imm; Wed, 5 Sep 2018 05:46:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaEP+M9/3Jo457n9Rq5N+vhwE2wsbJ/cU5V1SrO3AWTknzrCFUJU6qbH1FNeKaWqSUcD2JV X-Received: by 2002:a63:5a65:: with SMTP id k37-v6mr36118074pgm.143.1536151595072; Wed, 05 Sep 2018 05:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536151595; cv=none; d=google.com; s=arc-20160816; b=tPtYq7YGTjJBV3hukpM8SmTRgNLbm3qH7iCTGkWyLsqipFRo8Ap6NwmTYRc5x+XSAY zf0NDzj8gKFU9jUQCEt7aQf7bDH/42YcTEaTKlUAPfWXPQIVbvUPW92Oar51xvjXOHLt khGIAAOnvko2Sne/JEhxqUW+BJ1eVpRwuOS2SnJxcNglVl/uKGoyVqM16cT1q1pJAI2n u+K+6CF09m6AOYfnAWkpeqSBHjbFmVYKjscIXREE2+sr+QFgIMRxcIOJq1GlY/zglg+c E4L7pF+mBvXZ2Zj6J2V6dBe8SLTnENlWIoZZVkmi1+CN6/KO8pqMF3aXLrglsWa74Jv0 MrMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=nmlwHzVZjfNoOG5BZxV8hhJQuoOmwNjsI9ViaHrZrME=; b=0tMr4mQOSJ7nqzedrPT6e8cBdm3X/p8Vj0Ru6OndlF79XWMs7iOWWRm/Fa6WX3ZDPE 2a1rXQDWk/S7OrsL07ifLBAFUeL5qc78vaR3UQw5RfkGk6M+zTBWjjiHjVE+L3KELHv2 vxuad4KL9SFhbwwpYezH758K4BcsHWurSpYe1eNGtQBoxdGewsSYQu+cyR6Jjzlw8sRd WoofrUKuRlBVVaKoKYMarKqhtMvxDVQ8l+dAgRky6XPl29HpHXkUZAHaKcE8aL8gfI6/ N8cg/iIFG8zjr9Pd8PtTN7/ZoPZAPmLIb2Xb1RWP112gHb9lTNEjbWQw+s69r3uBOIFD 1++Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l24-v6si1982387pgj.158.2018.09.05.05.46.18; Wed, 05 Sep 2018 05:46:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbeIERPR (ORCPT + 99 others); Wed, 5 Sep 2018 13:15:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55934 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726071AbeIERPQ (ORCPT ); Wed, 5 Sep 2018 13:15:16 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6446240216E3; Wed, 5 Sep 2018 12:45:09 +0000 (UTC) Received: from [10.43.2.69] (unknown [10.43.2.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 305C52142F20; Wed, 5 Sep 2018 12:45:08 +0000 (UTC) Subject: Re: [PATCH net] be2net: Fix memory leak in be_cmd_get_profile_config() To: Petr Oros , netdev@vger.kernel.org Cc: Sathya Perla , Ajit Khaparde , Sriharsha Basavapatna , Somnath Kotur , "David S. Miller" , linux-kernel@vger.kernel.org References: <20180905123746.7399-1-poros@redhat.com> From: Ivan Vecera Message-ID: <4d28cb4d-a4e1-520d-27ee-ade1d4fb4fe4@redhat.com> Date: Wed, 5 Sep 2018 14:45:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180905123746.7399-1-poros@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 05 Sep 2018 12:45:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 05 Sep 2018 12:45:09 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ivecera@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5.9.2018 14:37, Petr Oros wrote: > DMA allocated memory is lost in be_cmd_get_profile_config() when we > call it with non-NULL port_res parameter. > > Signed-off-by: Petr Oros > --- > drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c > index ff92ab1daeb8..1e9d882c04ef 100644 > --- a/drivers/net/ethernet/emulex/benet/be_cmds.c > +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c > @@ -4500,7 +4500,7 @@ int be_cmd_get_profile_config(struct be_adapter *adapter, > port_res->max_vfs += le16_to_cpu(pcie->num_vfs); > } > } > - return status; > + goto err; > } > > pcie = be_get_pcie_desc(resp->func_param, desc_count, > Good catch, Petr. Reviewed-by: Ivan Vecera