From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58]) by dpdk.org (Postfix) with ESMTP id F20477CE1 for ; Mon, 20 Nov 2017 07:59:30 +0100 (CET) X-AuditID: c1b4fb3a-039e19c000004c48-1c-5a127d52f0a2 Received: from ESESSHC022.ericsson.se (Unknown_Domain [153.88.183.84]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id 5E.31.19528.25D721A5; Mon, 20 Nov 2017 07:59:30 +0100 (CET) Received: from labserv2.eth.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.86) with Microsoft SMTP Server id 14.3.352.0; Mon, 20 Nov 2017 07:59:28 +0100 Received: from gep5.sdn.hu.eld.ericsson.se (unknown [172.31.40.105]) by labserv2.eth.ericsson.se (Postfix) with ESMTP id BF07C29C72C; Mon, 20 Nov 2017 07:53:06 +0100 (CET) From: Gellert Babel To: , CC: , Jan Wickbom , Gellert Babel Date: Mon, 20 Nov 2017 07:59:13 +0100 Message-ID: <1511161153-5127-1-git-send-email-gellert.babel@ericsson.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFLMWRmVeSWpSXmKPExsUyM2J7iG5QrVCUwd/NkhbvPm1nsjjWuYfF omXJTiYHZo9fC5ayetz4d4vN4/2+q2wBzFFcNimpOZllqUX6dglcGas3+BUcZ6/4MXsxYwPj DLYuRk4OCQETifunWxi7GLk4hAQOM0rsXvGcFcLZwijx7fEdNghnPaPEvFsP2UFa2AQMJNrm rWEEsUUELCTOzutjArGZBTIkXq4/DzZWWMBJYu/pu8wgNouAqsSGq/OAejk4eAU8Jab/SYPY LCdx8thkVhCbV0BQ4uTMJywQYyQkDr54AdYqJKAusenuNOYJjHyzkJTNQlK2gJFpFaNocWpx cW66kZFealFmcnFxfp5eXmrJJkZgiB3c8ttqB+PB546HGAU4GJV4eNc6CEUJsSaWFVfmHmKU 4GBWEuFViwIK8aYkVlalFuXHF5XmpBYfYpTmYFES5z3pyRslJJCeWJKanZpakFoEk2Xi4JRq YLTg2Bi9KvtqXrzrh7vvrIoZfPbu8BA82/b98/9riy5U+CZtd58jL5nZ5CTmGzLDQnf6v5a7 TyS8KoPaZq3kei7h8T697s4kTR/Xmk97z3c/itrNXdttoHP21dbl8+/tTmiK2XL4r614CvuJ fY+ZP2/zuWcZ5/fcfdHR0JT5d+eUrNGZu/q34ColluKMREMt5qLiRABNHJEfLQIAAA== Subject: [dpdk-dev] [PATCH] vhost user: unlink sockaddr when poll sched fails 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: , X-List-Received-Date: Mon, 20 Nov 2017 06:59:31 -0000 From: Jan Wickbom Issue: Vhost user socket addresses left in /var/run/openvswitch. This will lead to failure to add vhost user ports with names that already exist in this directory. When there is a failure to add a vhost user socket file descriptor to the file descriptor set using fdset_add() in rte_vhost_driver_register() the address bound to the socket is not released. Solution: Add unlink of the file path corresponding to the socket address. Signed-off-by: Jan Wickbom Signed-off-by: Gellert Babel --- lib/librte_vhost/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 41aa3f9..eb9dae2 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -352,6 +352,7 @@ struct vhost_user { err: close(fd); + unlink(path); return -1; } -- 1.9.1