Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2366969imm; Sun, 5 Aug 2018 02:38:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdgIuPMPVn1O7gx1380lUIRniNe6BYtAT+6LbGF/hGnytv5FBZZf1D8Gykph0mhhDBnz70g X-Received: by 2002:a17:902:988c:: with SMTP id s12-v6mr9952462plp.199.1533461938669; Sun, 05 Aug 2018 02:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533461938; cv=none; d=google.com; s=arc-20160816; b=elHmVIJqhz5fyLS74Yc/J89OgLExDexPxxhJJRkEPhRn3mQEgS+8j561Q6tuRNfuR9 StUWd+4HKOjS3TWDEyGbtrDztEpPTWRQrzjt4fkwCzv887GpshGryiKgtZmUxJhLywPA esEqkdSPelSYhXUF6V5yf41bDl5KLbY4Dmbt2S7BZElmj+MkFye+aqgiIeOBHMQ7tU0o vK9XCGxK1u0WG3mPiifCmIGx2HrNKLREu2fTQ366qgGtATHzaamEka2vgL9Kuw9ezw+B erIzmkhdgg+2St/PjGO3geU8iz5U0RwsGg2aw4OnKX61jCVrr1w0R6o3+5RG07IZvgW+ SCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=wOvgYrjgrbg4qqshdg8SOQM0e9Tsj9Sk+BetyWsEDyk=; b=0L9B3rxPMe/wtpNBcJqqIIIyv+IJRv7DADTwaOZLU/vL9Z6+z2zxqF/cyosqBPdU0n DJ7E6Uo+fSjVfXUpc0rYuVy4p9RcmbV+0Plhp/qCzq3sLf7NIH3915+M+Q5cOphymWEm 5MwX8fBxIjdhZGOoWOG+nnURTcqYcSlg+PYdA3II2UYn+iHm8KfvVGt5c/gWBtBUibiZ s2YaNgqryf44iHGZFLXJgmEEMRW2+QTRbZM8supbXvvdi+6jRmNcrRR6lpoRS0+kDvHQ b23J23ri5qc0s2fHef780LHa71oTS25fq1VgnnEppTNFTc4c1ihoYVADFEGdkSfqLfMF yyog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x37-v6si8696187pgl.544.2018.08.05.02.38.43; Sun, 05 Aug 2018 02:38:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbeHELlw (ORCPT + 99 others); Sun, 5 Aug 2018 07:41:52 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:6400 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726080AbeHELlw (ORCPT ); Sun, 5 Aug 2018 07:41:52 -0400 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 0ACD4331431C9; Sun, 5 Aug 2018 17:37:53 +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.399.0; Sun, 5 Aug 2018 17:37:53 +0800 Received: from DGGEMM507-MBX.china.huawei.com ([169.254.1.75]) by dggemm422-hub.china.huawei.com ([10.1.198.39]) with mapi id 14.03.0399.000; Sun, 5 Aug 2018 17:37:44 +0800 From: Nixiaoming To: Paul Moore CC: "viro@zeniv.linux.org.uk" , "serge@hallyn.com" , James Morris , Eric Paris , Stephen Smalley , Lizefan , "miaoxie (A)" , "linux-kernel@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "selinux@tycho.nsa.gov" , "linux-fsdevel@vger.kernel.org" Subject: RE: maybe resource leak in security/selinux/selinuxfs.c Thread-Topic: maybe resource leak in security/selinux/selinuxfs.c Thread-Index: AdQpeVHZ6C+RBxudSMK/r1O5xUSIwQBn/rAAAGGKKYA= Date: Sun, 5 Aug 2018 09:37:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.57.88.168] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gU2F0dXJkYXksIEF1Z3VzdCAwNCwgMjAxOCAzOjAxIEFNIFBhdWwgTW9vcmUgPHBhdWxAcGF1 bC1tb29yZS5jb20+IHdyb3RlOg0KPk9uIFdlZCwgQXVnIDEsIDIwMTggYXQgNTozOSBBTSBOaXhp YW9taW5nIDxuaXhpYW9taW5nQGh1YXdlaS5jb20+IHdyb3RlOg0KPj4NCj4+IGFkdmlzb3J5Og0K Pj4gMSBBZnRlciBjcmVhdGluZyBkZW50cnkgaW4gZF9hbGxvY19uYW1lLCBzaG91bGQgSSBjYWxs IGRwdXQgdG8gcmVsZWFzZSByZXNvdXJjZXMgYmVmb3JlIHRoZSBleGNlcHRpb24gZXhpdD8NCj4+ IDIgQWZ0ZXIgY2FsbGluZyB0aGUgbmV3X2lub2RlIHRvIGNyZWF0ZSBhbiBpbm9kZSwgc2hvdWxk IHRoZSBpbm9kZSByZXNvdXJjZSBiZSByZWxlYXNlZCBiZWZvcmUgdGhlIGV4Y2VwdGlvbiBleGl0 Pw0KPj4NCj4+IElmIHRoZSBkZW50cnkgYW5kIGlub2RlIHJ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