From patchwork Wed Jul 6 17:22:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 113752 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1581A0540; Wed, 6 Jul 2022 19:22:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BD0040687; Wed, 6 Jul 2022 19:22:33 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 05D5240156 for ; Wed, 6 Jul 2022 19:22:33 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id 2507420DDCBC; Wed, 6 Jul 2022 10:22:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2507420DDCBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1657128152; bh=i9c9AdiZWWvSX9AQwDiD7jrdDljZusvoTUGSdO7Hmxk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=JGPoq2+jwxtJPq8R7U88p4qbr1Jkz9zONg2r8skB5ksJlJ60pBkFQBdyFUWFNeaLE 14OhdeDpblQV3kPzgJ/waCeTCoLk+8T6mZ84cGY1kyyTWsP1ns6EBADLnOdU5mQbr9 Ks9Exkv4ST/u6AziYilInrdu0rutkw5R6VI7D9CM= From: longli@linuxonhyperv.com To: Matan Azrad , Ferruh Yigit Cc: dev@dpdk.org, Long Li Subject: [PATCH] net/mlx4: fix verbs cmd fd leak in the secondary process Date: Wed, 6 Jul 2022 10:22:24 -0700 Message-Id: <1657128145-7764-1-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: longli@microsoft.com Errors-To: dev-bounces@dpdk.org From: Long Li FDs passed from rte_mp_msg are duplicated to the secondary process and need to be closed. Fixes: 0203d33a10 ("net/mlx4: support secondary process") Signed-off-by: Long Li --- drivers/net/mlx4/mlx4_txq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c index 0db2e55bef..bf7e036e19 100644 --- a/drivers/net/mlx4/mlx4_txq.c +++ b/drivers/net/mlx4/mlx4_txq.c @@ -146,6 +146,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd) if (ret) goto error; } + close(fd); return 0; error: /* Rollback. */ @@ -155,6 +156,7 @@ mlx4_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd) continue; txq_uar_uninit_secondary(txq); } while (i--); + close(fd); return -rte_errno; }