Received: by 10.213.65.68 with SMTP id h4csp2116375imn; Sun, 8 Apr 2018 20:07:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx489C/AvxkR5vxlLw8dUaYzhSe41C0ZHkC+7G9u90hFmUNWlEIsZ1A0TnUqLGFujEiNqEArt X-Received: by 2002:a17:902:8ec8:: with SMTP id x8-v6mr37667391plo.179.1523243234061; Sun, 08 Apr 2018 20:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243234; cv=none; d=google.com; s=arc-20160816; b=bhZEl7IZGc0frpb20H/pPZpfiSOJD7PlvdHz2EwPxqxnDcTwW94l6Y6XhOzWidhG1h CP8soqJ3e5USkR2Fi+zO3GT4D17quxi13lNu0ghW75tP6rlNLA3v2Y/dCZkMHa5drxpL hcmjEPWrl1AfVzP66bZa8iGI9UdC2C8PsaT+Ni74ONRxAk41KUEU6ziVKBOuvFy67Q1E t+FI322fX8zpfb0c++NwFW55/Eh+knUuByvTpuW+XZr8YFkLBOEtraNwgWb7k+LAlg9z YT+SlVAmuLAgGAOjS3RS3eJOgULFcddpAi1PZ+SgZ5BkX9FuBbzK3lwQMjztXfFt/4bc IA5g== 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 :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ZHHETnZYR6VW3ZXM5DetKJ2E13HQaxnnA/mcw9IwRrc=; b=gT2PJKlvw7GpJOrcRfFnRJ2WW4pdWOONDPjRe8A3JV9YEzGUi2DE/W3+pfMV/fCrK8 b8N39shNkp5xcRAgIqD6oS15/KTbwBjsxyPN64zXiyKsgYXcJi3butCMynUewgrQvA/t Cmhof3RMTNXG/lVEpHGowBQ4xF5Deqz1Y5HWMxC6yMCLI2IBXHr717MA2mq3/lKpqwL2 SiuT2uLIIhT3p5mComE4xdIgg7l2ykKgpZD2f958WZ2/GpDPobqNg3dQkmXY0IjbGjen B44Afz+xNN2F5z3VgRUC/j60bxOx5CzokNsmGu2aAgy/r8nRx68TaS1GkWiuNoE+2V6y X7rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=V14oNfhq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n28si10730658pgf.284.2018.04.08.20.06.37; Sun, 08 Apr 2018 20:07:13 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=V14oNfhq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756924AbeDIBUD (ORCPT + 99 others); Sun, 8 Apr 2018 21:20:03 -0400 Received: from mail-sn1nam02on0135.outbound.protection.outlook.com ([104.47.36.135]:3040 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756056AbeDIAho (ORCPT ); Sun, 8 Apr 2018 20:37:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZHHETnZYR6VW3ZXM5DetKJ2E13HQaxnnA/mcw9IwRrc=; b=V14oNfhq4JjLKndyt2eaeXntNNU5L2vCgxfuNa8kKRKzwvgm79LxbsYvYMyeuTxsl/YQutKT1BsoE+AW8D3HhcnuzwsDhtHBlHvpkOWCbrM6JLlwO415QRl/qKhufiHL7IPeX4addVcEBEIXU6oIkhJ2BvgJJT3XcMxxRZLsmBg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:37:41 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:37:41 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "Luis R. Rodriguez" , Jessica Yu , Al Viro , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 095/162] fs: warn in case userspace lied about modprobe return Thread-Topic: [PATCH AUTOSEL for 4.4 095/162] fs: warn in case userspace lied about modprobe return Thread-Index: AQHTz5m9ZwujDvXiwU6400nq9z+0qQ== Date: Mon, 9 Apr 2018 00:28:54 +0000 Message-ID: <20180409002738.163941-95-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1031;7:rBGUPwyAYm0lJT3JUkghVgFunh2Bv+zTET8ZUfC5kEmx6mK5Vq7xk2KPWpqJIQYg2AIsuTHDU+Q27TH+FeHzkeIrA+0ebalXAbhX4i2vJK+h0a12H1Mz4iPRXo2bgKxDlq0suSzdU9a/HEtCvWorajyPmgyHr0E6KeiVwPNJbzNO+FarGtAySR9dhgGbKFbK7hM0HSRRcfc9yd+u5QxIhMPju2n+ngiXzDI8c5JMBfyM4w25fr8SKYBE98I2BEHi;20:+x5UdwEt/IF/JvTLhL4g123qCqoZKAZFkdcQ4AEdPzYu/Uk8T5jaQnkH68f/ayMe7isaEyxisLjuZu2iYcTrfIW2OOaM3BS5j1eez+4jdJ5mvum2hiv+Ff9SJ+Qjgcav2VF78418nbSJicSSW5TGyt3nbdF0fJHkXVHHDwiJLrs= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 23fba50e-cbfd-47cf-9b8d-08d59db21a39 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(84791874153150)(46150409022019); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(2900100001)(10290500003)(99286004)(76176011)(14454004)(966005)(7736002)(11346002)(26005)(6666003)(86612001)(72206003)(478600001)(36756003)(106356001)(66066001)(2616005)(186003)(22452003)(86362001)(68736007)(305945005)(54906003)(102836004)(486006)(59450400001)(110136005)(316002)(6506007)(446003)(107886003)(53936002)(4326008)(105586002)(6306002)(6436002)(6486002)(476003)(6512007)(5660300001)(5250100002)(25786009)(3846002)(6116002)(1076002)(97736004)(3280700002)(2501003)(2906002)(81156014)(8676002)(10090500001)(81166006)(8936002)(3660700001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: NYW+cbU8o8nudYFLIV6x1KbyV5gtufGgQnu7SFKQedYKDMBTFabMD322joquQv8ftHkhQicDeSv684hXMtt6g+ajXW9lCGzIr1wqJuAylLRppXL6lNjNx1D/L7kaKgsY5l+tRJPc6TjgUpbBE1MVt178gtBt8dTzay2muAbBzshBe6b1NqLDHSBcL0ZMpHkZgFZUUxMFwvTFiBWC7ywOHYfhYcY9/5JBM4ZGAMCm6neDrIOEJGnRihCOQsspakALEjmFZT8dytmXgaJO+fWdT1rSBD6ONDCXYd09f90yaNkq2BB1J/992VDYKQ50DryyTDK2kwfGTVI+d7LE0bqNhp0KUtiiwe27Ci4q59s7kjWZ0G6kcwe2zMHLaSGMXnl/X6SiZ5uUbQAgCxhTNclQtb/p8A+DOxvKZ1E0eem/g+Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23fba50e-cbfd-47cf-9b8d-08d59db21a39 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:54.2866 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Luis R. Rodriguez" [ Upstream commit 41124db869b7e00e12052555f8987867ac01d70c ] kmod <=3D v19 was broken -- it could return 0 to modprobe calls, incorrectly assuming that a kernel module was built-in, whereas in reality the module was just forming in the kernel. The reason for this is an incorrect userspace heuristics. A userspace kmod fix is available for it [0], however should userspace break again we could go on with an failed get_fs_type() which is hard to debug as the request_module() is detected as returning 0. The first suspect would be that there is something worth with the kernel's module loader and obviously in this case that is not the issue. Since these issues are painful to debug complain when we know userspace has outright lied to us. [0] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/libkmod/li= bkmod-module.c?id=3Dfd44a98ae2eb5eb32161088954ab21e58e19dfc4 Suggested-by: Rusty Russell Cc: Jessica Yu Signed-off-by: Luis R. Rodriguez Signed-off-by: Al Viro Signed-off-by: Sasha Levin --- fs/filesystems.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/filesystems.c b/fs/filesystems.c index 5797d45a78cb..2a7ae03f821e 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -275,8 +275,10 @@ struct file_system_type *get_fs_type(const char *name) int len =3D dot ? dot - name : strlen(name); =20 fs =3D __get_fs_type(name, len); - if (!fs && (request_module("fs-%.*s", len, name) =3D=3D 0)) + if (!fs && (request_module("fs-%.*s", len, name) =3D=3D 0)) { fs =3D __get_fs_type(name, len); + WARN_ONCE(!fs, "request_module fs-%.*s succeeded, but still no fs?\n", l= en, name); + } =20 if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) { put_filesystem(fs); --=20 2.15.1