From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 738BEA0588; Thu, 16 Apr 2020 03:15:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A6011DA6B; Thu, 16 Apr 2020 03:15:36 +0200 (CEST) Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) by dpdk.org (Postfix) with ESMTP id 4E5601D9AC; Thu, 16 Apr 2020 03:15:34 +0200 (CEST) Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 9FFC5151543BB661C9DF; Thu, 16 Apr 2020 09:15:31 +0800 (CST) Received: from DGGEMM422-HUB.china.huawei.com (10.1.198.39) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 16 Apr 2020 09:15:30 +0800 Received: from DGGEMM533-MBX.china.huawei.com ([169.254.5.250]) by dggemm422-hub.china.huawei.com ([10.1.198.39]) with mapi id 14.03.0487.000; Thu, 16 Apr 2020 09:15:24 +0800 From: wangyunjian To: Ferruh Yigit , "dev@dpdk.org" CC: "keith.wiles@intel.com" , "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 5/5] net/tap: fix leak of fds on failure Thread-Index: AQHWD/PZDRq6mhkQjk6nQDCBtJHYeah5yyyAgAEtbGA= Date: Thu, 16 Apr 2020 01:15:22 +0000 Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60CF6BF00@DGGEMM533-MBX.china.huawei.com> References: <1586604294-16616-1-git-send-email-wangyunjian@huawei.com> <8ed7ca4e-a165-3432-9078-050c871d988e@intel.com> In-Reply-To: <8ed7ca4e-a165-3432-9078-050c871d988e@intel.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.251.152] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4 5/5] net/tap: fix leak of fds on failure 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" PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBGZXJydWggWWlnaXQgW21haWx0 bzpmZXJydWgueWlnaXRAaW50ZWwuY29tXQ0KPiBTZW50OiBXZWRuZXNkYXksIEFwcmlsIDE1LCAy MDIwIDExOjE1IFBNDQo+IFRvOiB3YW5neXVuamlhbiA8d2FuZ3l1bmppYW5AaHVhd2VpLmNvbT47 IGRldkBkcGRrLm9yZw0KPiBDYzoga2VpdGgud2lsZXNAaW50ZWwuY29tOyBMaWxpanVuIChKZXJy eSkgPGplcnJ5LmxpbGlqdW5AaHVhd2VpLmNvbT47IHh1ZGluZ2tlDQo+IDx4dWRpbmdrZUBodWF3 ZWkuY29tPjsgc3RhYmxlQGRwZGsub3JnDQo+IFN1YmplY3Q6IFJlOiBbZHBkay1kZXZdIFtQQVRD SCB2NCA1LzVdIG5ldC90YXA6IGZpeCBsZWFrIG9mIGZkcyBvbiBmYWlsdXJlDQo+IA0KPiBPbiA0 LzExLzIwMjAgMTI6MjQgUE0sIHdhbmd5dW5qaWFuIHdyb3RlOg0KPiA+IEZyb206IFl1bmppYW4g V2FuZyA8d2FuZ3l1bmppYW5AaHVhd2VpLmNvbT4NCj4gPg0KPiA+IFdoZW4gZXRoX2Rldl90YXBf Y3JlYXRlKCkgaXMgZmFpbGVkLCBubHNrX2ZkIGFuZCBrYV9mZCB3b24ndCBiZSBjbG9zZWQNCj4g PiB0aHVzIGxlYWRpbmcgZmRzIGxlYWsuIFplcm8gaXMgYSB2YWxpZCBm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