From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3636B5F35 for ; Wed, 1 Aug 2018 15:21:19 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from ophirmu@mellanox.com) with ESMTPS (AES256-SHA encrypted); 1 Aug 2018 16:24:41 +0300 Received: from localhost.localdomain (pegasus05.mtr.labs.mlnx [10.210.16.100]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w71DLI7Q026993; Wed, 1 Aug 2018 16:21:18 +0300 Received: from pegasus05.mtr.labs.mlnx (localhost [127.0.0.1]) by localhost.localdomain (8.14.7/8.14.7) with ESMTP id w71DLIm8020939; Wed, 1 Aug 2018 13:21:18 GMT Received: (from root@localhost) by pegasus05.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id w71DLIVs020938; Wed, 1 Aug 2018 13:21:18 GMT From: Ophir Munk To: stable@dpdk.org, Shahaf Shuler Cc: Thomas Monjalon , Olga Shern , Ophir Munk Date: Wed, 1 Aug 2018 13:21:13 +0000 Message-Id: <1533129673-20901-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-stable] [PATCH 17.11 v1] net/mlx5: fix secondary process resource leakage X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 13:21:19 -0000 When running testpmd with an mlx5 device and then executing at testpmd prompt in a raw: "port start all" followed by "port stop all" a new file named /var/tmp/net_mlx5_ is created as a result of creating a new unix domain socket (used for communication between the primary and secondary processes). When the new unix socket file is created the old unix socket file should have been removed. This commit fixes it by closing the old unix socket just before creating the new one in function priv_socket_init() Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- drivers/net/mlx5/mlx5_socket.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c index 5cd1ab8..e817df1 100644 --- a/drivers/net/mlx5/mlx5_socket.c +++ b/drivers/net/mlx5/mlx5_socket.c @@ -62,6 +62,12 @@ struct stat file_stat; /* + * Close the last socket that was used to communicate + * with the secondary process + */ + if (priv->primary_socket) + priv_socket_uninit(priv); + /* * Initialise the socket to communicate with the secondary * process. */ -- 1.8.3.1