From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 30774A05D3 for ; Tue, 23 Apr 2019 22:16:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA3561B101; Tue, 23 Apr 2019 22:16:18 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40073.outbound.protection.outlook.com [40.107.4.73]) by dpdk.org (Postfix) with ESMTP id 2F1966833 for ; Tue, 23 Apr 2019 22:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqxmBUFNF2qbenA69F3fNKkbbHoBV0doHr2wZDFX7u8=; b=lIH2fxlUAQYtvYkVLKipIdqvCUkgvuyPHL2ekJMEW3zglk6qXvdJkWvjbf+3f+wqaIUcz1Om04QO9pWzc7jBspvcrffHxiNuvbMpRbV37Tdn4qYKtG9HNV48kQ/YMMYiAlSaozusvJcNKX94aj23hFkITFNMEJYcj/DCZ+61ERE= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3993.eurprd05.prod.outlook.com (52.134.70.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Tue, 23 Apr 2019 20:16:16 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::e8d5:4aff:902d:6e98]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::e8d5:4aff:902d:6e98%5]) with mapi id 15.20.1835.010; Tue, 23 Apr 2019 20:16:16 +0000 From: Yongseok Koh To: Herakliusz Lipiec CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [PATCH v2 8/8] ipc: fix net/mlx5 memleak Thread-Index: AQHU+fwXacgiajWwi0ikDduZOZnV+aZKLtQA Date: Tue, 23 Apr 2019 20:16:15 +0000 Message-ID: References: <20190417143822.21276-1-herakliusz.lipiec@intel.com> <20190423174334.19612-1-herakliusz.lipiec@intel.com> <20190423174334.19612-9-herakliusz.lipiec@intel.com> In-Reply-To: <20190423174334.19612-9-herakliusz.lipiec@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 957faa0c-c0bb-4bb1-80c7-08d6c8288a1c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:DB3PR0502MB3993; x-ms-traffictypediagnostic: DB3PR0502MB3993: x-microsoft-antispam-prvs: x-forefront-prvs: 0016DEFF96 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(396003)(346002)(376002)(189003)(199004)(8936002)(256004)(25786009)(76176011)(97736004)(83716004)(66066001)(102836004)(26005)(53546011)(14454004)(14444005)(33656002)(7736002)(6506007)(229853002)(71190400001)(71200400001)(478600001)(6486002)(6436002)(68736007)(5660300002)(446003)(82746002)(11346002)(6512007)(305945005)(53936002)(91956017)(86362001)(64756008)(316002)(2906002)(36756003)(2616005)(8676002)(486006)(476003)(6916009)(4326008)(73956011)(99286004)(66946007)(66556008)(66446008)(66476007)(186003)(6246003)(6116002)(81156014)(76116006)(81166006)(54906003)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3993; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 7VgINf0HJTPme/sOb6Uh6hDJvNSZndCE5ni9/CWQTuwm6BS0XZ9DIFmrrkuZzwZ0EgtqlQHWhAZdcxdUWf52qFawqxiauty9yMd5I6BA+D3FPg2L0yvupQgFobXCvvxwc8nJer1CqugKODpMVS3ixRI4oWu8JaTwM8ijEZTe2jV6oLKv29HJHTayeX8QSa+AOBauxyZahSrNgOHKb94qzGhYxV1jRzrzYXyEmRoo2CKJY8LWGVGU/HLgiwngkOIiTf+7dIWuu5b0ZQqBVFUJN3QBAX3F92S8vaRgvYcgBmmEqeUZawv+uMrKkS2bEzZBXUB+veqOljchEoR/YcQpLiTwizui4Ky/tgrOP0z8wxy7HotXja7QxT03GobxYkQLBFvp5alOb3fLvdsY1Ha+vkMmPKxR6Ur45iQGEKAGiKM= Content-Type: text/plain; charset="UTF-8" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 957faa0c-c0bb-4bb1-80c7-08d6c8288a1c X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2019 20:16:15.9593 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3993 Subject: Re: [dpdk-dev] [PATCH v2 8/8] ipc: fix net/mlx5 memleak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190423201615.ReUMCZA3qNNGU3L4WRorgR0P6K2WhWG71cS4eZYY5mg@z> > On Apr 23, 2019, at 10:43 AM, Herakliusz Lipiec wrote: >=20 > When sending synchronous IPC requests, the caller must free the response= =20 > buffer even if the request returned failure. Fix the code to correctly=20 > use the IPC API. >=20 > Bugzilla ID:228 > Fixes: 9a8ab29b84d3 ("net/mlx5: replace IPC socket with EAL API") > Fixes: c18cf501a7af ("net/mlx5: enable secondary process to register DMA = memory") > Cc: yskoh@mellanox.com > Signed-off-by: Herakliusz Lipiec > --- Acked-by: Yongseok Koh > drivers/net/mlx5/mlx5_mp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_mp.c b/drivers/net/mlx5/mlx5_mp.c > index cea74adb6..c9915b1d5 100644 > --- a/drivers/net/mlx5/mlx5_mp.c > +++ b/drivers/net/mlx5/mlx5_mp.c > @@ -258,6 +258,7 @@ mlx5_mp_req_mr_create(struct rte_eth_dev *dev, uintpt= r_t addr) > if (ret) { > DRV_LOG(ERR, "port %u request to primary process failed", > dev->data->port_id); > + free(mp_rep.msgs); > return -rte_errno; > } > assert(mp_rep.nb_received =3D=3D 1); > @@ -295,7 +296,8 @@ mlx5_mp_req_verbs_cmd_fd(struct rte_eth_dev *dev) > if (ret) { > DRV_LOG(ERR, "port %u request to primary process failed", > dev->data->port_id); > - return -rte_errno; > + ret =3D -rte_errno; > + goto exit; > } > assert(mp_rep.nb_received =3D=3D 1); > mp_res =3D &mp_rep.msgs[0]; > --=20 > 2.17.2 >=20