Message ID | 1461699396-33000-2-git-send-email-seth.forshee@canonical.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <selinux-bounces@tycho.nsa.gov> X-Original-To: patchwork-selinux@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC8889F441 for <patchwork-selinux@patchwork.kernel.org>; Tue, 26 Apr 2016 20:12:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BF66201EF for <patchwork-selinux@patchwork.kernel.org>; Tue, 26 Apr 2016 20:12:29 +0000 (UTC) Received: from emsm-gh1-uea11.nsa.gov (emsm-gh1-uea11.nsa.gov [8.44.101.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C60A20138 for <patchwork-selinux@patchwork.kernel.org>; Tue, 26 Apr 2016 20:12:26 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.24,538,1454976000"; d="scan'208";a="15643976" IronPort-PHdr: =?us-ascii?q?9a23=3ADPuZxxGA3xAG5Ccfa1NSj51GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ74pMiwAkXT6L1XgUPTWs2DsrQf27qQ7PGrADdeqb+681k8M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJP?= =?us-ascii?q?K/jvHcaK1oLsh7D0pMyYOl4WzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRu?= =?us-ascii?q?JN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqL?= =?us-ascii?q?cQzarFYGU25erVwAKQnI4BzgW573+GOuu+B81SWXJ8jeXbU1Qi+j6KEtQxjt3m?= =?us-ascii?q?NPHjo04GjRhsFqxJxauhXp8wJ+2Yn8coyTNeQ4eqLbYMNcQnBOGNtSAX9vGIS5?= =?us-ascii?q?OrACE+pJE+FCtInwqhNathaiBU+iA/n0yjJFrnT/26o80u8oFUfN2wl2TIFGi2?= =?us-ascii?q?jdsNigbPRaauuy1qSdiGybN/4=3D?= X-IPAS-Result: =?us-ascii?q?A2EJBQBzyh9X/wHyM5BeHAGCcCuBULt0IoF2hUVMAQEBAQE?= =?us-ascii?q?BAgJiJ4ItfVs9AQEBAwECDxUTBgEBDCAGBQECAwkBARcIIQgIAwEtAwEFAQsRB?= =?us-ascii?q?gEHCwUYBAGICAGlVYExPjGKT4UoAQSMRgEBCAEBAQEWBgqEDYIKiFoRAYV0AY5?= =?us-ascii?q?MiUiBVYxEiSolhUCNcjCBDmKECU4Bh3iBNQEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2016 20:12:24 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u3QKCMMv021506; Tue, 26 Apr 2016 16:12:23 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u3QJanus172282 for <selinux@prometheus.infosec.tycho.ncsc.mil>; Tue, 26 Apr 2016 15:36:49 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u3QJakxk011587 for <selinux@tycho.nsa.gov>; Tue, 26 Apr 2016 15:36:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+BQD9wR9X/yUp0ApeHYJwK4FQt3CEEYYPAoFATAEBAQEBAWYnhEIBAQEDEhUZAQEyBQEPIDE0AQUBHAYBEiKICAGlV4ExPjGKT4UoAQSMSgEBAQEBBQIBFwYKhA2CCo5gjk2JSIFVjESJKoVljXIwgQ5igXiCEU4BiS0BAQE X-IPAS-Result: A0A+BQD9wR9X/yUp0ApeHYJwK4FQt3CEEYYPAoFATAEBAQEBAWYnhEIBAQEDEhUZAQEyBQEPIDE0AQUBHAYBEiKICAGlV4ExPjGKT4UoAQSMSgEBAQEBBQIBFwYKhA2CCo5gjk2JSIFVjESJKoVljXIwgQ5igXiCEU4BiS0BAQE X-IronPort-AV: E=Sophos;i="5.24,537,1454994000"; d="scan'208";a="5410371" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 26 Apr 2016 15:36:49 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3ACiQ4yRJ+JBLxKVowttmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgVKfjxwZ3uMQTl6Ol3ixeRBMOAu6IC1Lud6vu4EUU7or+/81k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZv?= =?us-ascii?q?IaytQ8iJ35TxiLH5osaLKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu?= =?us-ascii?q?5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ6jiR6W?= =?us-ascii?q?ByaV53BUbSNeuBtFDwXf6Rj8FN+lvyH7u+ZwwiyyLcj3Vqs1XjLk5KBuHlugoS?= =?us-ascii?q?MKJzc//GzNwvJxlqUT9AygvRtX0YPSYZ/TMPt4Y7ObeskVA3dCCJV/TStEV7ix?= =?us-ascii?q?c4tHIe0bJuZVosGpvFYSrV2wAhO3BO7i4jRBgHjw3KYz16IqFgSQj19oJM4HrH?= =?us-ascii?q?mB9Ia9D6wVS+3gifCQlTg=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0HzAAD9wR9Xj6/fVdFeHYJwgXu3cIQRg?= =?us-ascii?q?g2EAgKBQEwBAQEBAQECAg8BAQEBBwsLCSEvgi19Wz0BAQEDEhUZAQEyBQEPIDE?= =?us-ascii?q?0AQUBHAYBEiKICAGlV4ExPjGKT4UoAQSMSgEBAQEBBQIBFwYKhA2CCo5gjk2JS?= =?us-ascii?q?IFVjESJKoVljXIwgQ6CWh6Bc04BiS0BAQE?= X-IPAS-Result: =?us-ascii?q?A0HzAAD9wR9Xj6/fVdFeHYJwgXu3cIQRgg2EAgKBQEwBAQE?= =?us-ascii?q?BAQECAg8BAQEBBwsLCSEvgi19Wz0BAQEDEhUZAQEyBQEPIDE0AQUBHAYBEiKIC?= =?us-ascii?q?AGlV4ExPjGKT4UoAQSMSgEBAQEBBQIBFwYKhA2CCo5gjk2JSIFVjESJKoVljXI?= =?us-ascii?q?wgQ6CWh6Bc04BiS0BAQE?= X-IronPort-AV: E=Sophos;i="5.24,537,1454976000"; d="scan'208";a="15642543" Received: from mail-io0-f175.google.com ([209.85.223.175]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 26 Apr 2016 19:36:47 +0000 Received: by mail-io0-f175.google.com with SMTP id 190so20523479iow.1 for <selinux@tycho.nsa.gov>; Tue, 26 Apr 2016 12:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d5m6xtGnCIj2kOi9yohuL/tUq13CGdPSJocC5pMsZ2A=; b=b5Y5oQy+8WXWh56tfv7//XTFo3cyv5C3xaxqsQVHQE24VqkRFBlDwpF8amlNHXf1Ss oWJ5Vt1yx1XVL47bZ6uBgUpvnJN4ZoPehCzttVPHz5C+mkDApGEIjyQVDnQ0GzFEQOKO 0Jn6DK5CIYBHlWUYZhWnLs/0K5TuV6kBD1Ozgi1YeBeI5radSVXnfmUfbsIOrI4p8YTu YOyOVzgn+GqjS/AuQYR0Pq7h81t7tYBHA5V517pqj26lMSPNcgH42C3U6kwg5yzMqJll qj09xCmv6KvbEaj2s9VR2Ezrag2SBZg7jJOZN1aSdOWjz3cbMccPDL56Gn54g+pidXMJ 6qEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d5m6xtGnCIj2kOi9yohuL/tUq13CGdPSJocC5pMsZ2A=; b=a8yxZ20NqLMpHZUMi6Iubw/6aJqKJ6cYT8+bq/KCbTSFiPmj7bWlOVLZ0zzGpzpdNP h81NrN+uKi7tmHLCSqyokHuq/3Xjkp3DgHAG5vssu14KCNABN1CqLcBb6MNUkXwy3dUH d4iR8Uvbv7QJ+2t8fLd6fFcNwDgBEmneI0I5goCpyZkdsj1kH/8j3jcgFBqattHCA9wx Bljj3AUqBElontefTpHtH1GRgrB94oUfeK4BOEaBFUxQUKKZ+JvXxZy8KWFAhDaII9cm /gk/A42vIG1Qdlgicf3Gki3Mf93YJk427Sm106v4JGJUaYApNJu7akCjlOUBYD2cWIP0 UVrw== X-Gm-Message-State: AOPr4FUAd/t2pvb4Ho2O0xapyOytWekk6VYyh5jXMzSEtchgLedPobf14kSGhfBw5kYV5VsG X-Received: by 10.107.6.198 with SMTP id f67mr6453973ioi.122.1461699407062; Tue, 26 Apr 2016 12:36:47 -0700 (PDT) Received: from localhost ([2605:a601:aab:f920:39a1:5bcf:aa:5b00]) by smtp.gmail.com with ESMTPSA id ip3sm2353056igb.14.2016.04.26.12.36.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 12:36:46 -0700 (PDT) From: Seth Forshee <seth.forshee@canonical.com> To: "Eric W. Biederman" <ebiederm@xmission.com>, Alexander Viro <viro@zeniv.linux.org.uk> Subject: [PATCH v4 01/21] fs: fix a posible leak of allocated superblock Date: Tue, 26 Apr 2016 14:36:14 -0500 Message-Id: <1461699396-33000-2-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1461699396-33000-1-git-send-email-seth.forshee@canonical.com> References: <1461699396-33000-1-git-send-email-seth.forshee@canonical.com> X-Mailman-Approved-At: Tue, 26 Apr 2016 16:11:01 -0400 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" <selinux.tycho.nsa.gov> List-Post: <mailto:selinux@tycho.nsa.gov> List-Help: <mailto:selinux-request@tycho.nsa.gov?subject=help> Cc: linux-bcache@vger.kernel.org, Serge Hallyn <serge.hallyn@canonical.com>, Seth Forshee <seth.forshee@canonical.com>, dm-devel@redhat.com, Miklos Szeredi <mszeredi@redhat.com>, Richard Weinberger <richard.weinberger@gmail.com>, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, fuse-devel@lists.sourceforge.net, Austin S Hemmelgarn <ahferroin7@gmail.com>, linux-mtd@lists.infradead.org, selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Pavel Tikhomirov <ptikhomirov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" <selinux-bounces@tycho.nsa.gov> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/super.c b/fs/super.c index 829841e0ae7e..092a7828442e 100644 --- a/fs/super.c +++ b/fs/super.c @@ -474,6 +474,10 @@ retry: continue; if (user_ns != old->s_user_ns) { spin_unlock(&sb_lock); + if (s) { + up_write(&s->s_umount); + destroy_super(s); + } return ERR_PTR(-EBUSY); } if (!grab_super(old))