Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp289457ybl; Thu, 5 Dec 2019 20:16:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzCPltmzTNW+n2z/st6GYPv9n+hCMeByrS+6+H3pawWOLSHpA9zf0RLBbyTIJGeolnDVkad X-Received: by 2002:aca:4183:: with SMTP id o125mr10005229oia.125.1575605812431; Thu, 05 Dec 2019 20:16:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575605812; cv=pass; d=google.com; s=arc-20160816; b=gNiVcly6p7SNZlT1+TMRD/5/56aqgIJGh6//v+r+XEuOyfJ3w2fgfIKk9YBU6KF8kh 5v3i7XDbboNZdXBH2ejTFXpBNU5+Xjavtv8y2FMTt9Ln3/clLeCSMCjG+HybXCqck0VD LHnD5Q+4tgo9LEeOttQ7+Z7H9WhjO5IO5ZI3TOBa9v+VY6uCy+FrxFl/+TZDfrcQaWEq vxjwiXnZyRZw8zGLqmvsHch5v77cf3H0wyXpfgLvMsg2Q1oTnEKJdLzs1SKT5lb7Z6aM Gemeqjs0hO/8jPmVuxcF+NedpOOEtjLtdK5877SBoGsIszECG9oRGhT2ACmnQPXfnnRy vZKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=7f0XGw89FbYPzO1tQ01o5TQyQoYdZAOyrECq+yi1EPs=; b=KZlEVDL1W00Cs2ZKoWfhOwWap5ygEb042aLmR68dNHzsHPyOe1DYii5jI8JHULh/ds 2yiCIoufDE5Z/V9LdmMPl8a/BFrtNAnwN1dahNe3yS8mFkgGC8L1GLScj77nuNi4nsXd xxK9uitIeoVWFXlbMwJmnTOPcapLlTHhgSqviLiUCUYrjW4q9IsykfCscOxYNQSKxAfK 0rm/EpcUe2E7OLNoWp2/et8N04Py2UI8Qk8LU2ztjbHnbl8Ua/PXU0YvgB6eo0UVZwMX 0bhyAyXj+hYBy9pmnfCu1ACeunHCd5YaDMgOHvmuDIrRoJVcAtTjs+gYkJSS6+oFugRi cwqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vmware.com header.s=selector2 header.b="zNMvv/7v"; arc=pass (i=1 spf=pass spfdomain=vmware.com dkim=pass dkdomain=vmware.com dmarc=pass fromdomain=vmware.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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n129si5361983oih.193.2019.12.05.20.16.37; Thu, 05 Dec 2019 20:16:52 -0800 (PST) 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=@vmware.com header.s=selector2 header.b="zNMvv/7v"; arc=pass (i=1 spf=pass spfdomain=vmware.com dkim=pass dkdomain=vmware.com dmarc=pass fromdomain=vmware.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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbfLFEQH (ORCPT + 99 others); Thu, 5 Dec 2019 23:16:07 -0500 Received: from mail-mw2nam12on2087.outbound.protection.outlook.com ([40.107.244.87]:58464 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726209AbfLFEQG (ORCPT ); Thu, 5 Dec 2019 23:16:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aIlRrzdNNBjjHsrLRO7XUxKq3qGdP0SQ43iDAb4ZZmrgFehu5IO26/v4qTmpNyKtUffXwN6jszhi7MIG8Vw1A5JuULyhDp5jCzhglnPtS+NrtPZ2TX77vuCaKriRG/cWbqVdz0GZDtzEMjZ95a/+02gNf5FFCV9P6BmLiiIVBpahnwAB2y7/eS6d20F+hNRqWPHI7oaFGrzbn4urtPmWgj7yRjZB9N/6PhtmG9ObGRk7QRPJCOr0KuaMJlH6cR9BMtTyqsCGNshkQ6C5fwRorDvghIO2iiN4T2Yrr/0NcchH8fNwTG/puQGDn5H861MICHt5lSFmNnG8IlX/mWAYsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7f0XGw89FbYPzO1tQ01o5TQyQoYdZAOyrECq+yi1EPs=; b=hyF8nPIWLc8eVSgvybzWmOpXCohLWE7PoCB3wwBXNx48Fbpqi3KtwoUX0e7VC5Voeuc1cN+cl+OajhP0pyRCx9G8paq7oVmx9VmxQf1NnvBRmYavAYSb/rgZhWfuA53QZWfLmeTWOzuftRDsgcFiPCdBP7oSjRQUBqrgc2dfbkCoov+J8g3KbAiX7O07rQYglWUtUrFZhfb2EoU3U6+tD+RhOwsyFx/PcObxgri8shsoLDy+8eUw97borOXNSEIFgUA+bM7SG304Qt9nqvVT/24E6dtfJgLApKlSOIueOY5yjTxBT6h79IRWcgeSJjyl1Md2MrSVT3WDmLx2UPbhnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7f0XGw89FbYPzO1tQ01o5TQyQoYdZAOyrECq+yi1EPs=; b=zNMvv/7vbC/JBZopTGcKZTR9FUhXRIZRE7XnzwyuU0H331IQZnbDM2i485p5bBUseuIKd+ahYvly9qeWpbY3W6omcq+pl5IHxSmhH5ZpB6ozyR0eRgxPz3voKkiFooZtUjpAaXTEfx0xuTrhLP2BYjgtYGlXTYYySxpxqPBdgjE= Received: from MN2PR05MB6208.namprd05.prod.outlook.com (20.178.241.91) by MN2PR05MB6190.namprd05.prod.outlook.com (20.178.240.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.6; Fri, 6 Dec 2019 04:15:24 +0000 Received: from MN2PR05MB6208.namprd05.prod.outlook.com ([fe80::ed0d:9029:720c:1459]) by MN2PR05MB6208.namprd05.prod.outlook.com ([fe80::ed0d:9029:720c:1459%2]) with mapi id 15.20.2538.000; Fri, 6 Dec 2019 04:15:23 +0000 From: Ajay Kaher To: Vlastimil Babka , "stable@vger.kernel.org" CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Linus Torvalds , Jann Horn , Matthew Wilcox , "stable@kernel.org" , Srivatsa Bhat , "srivatsa@csail.mit.edu" , Vasavi Sirnapalli , "Kirill A. Shutemov" Subject: Re: [PATCH STABLE 4.4 5/8] mm: prevent get_user_pages() from overflowing page refcount Thread-Topic: [PATCH STABLE 4.4 5/8] mm: prevent get_user_pages() from overflowing page refcount Thread-Index: AQHVlhhHx12DFRikrEimDS6JVcInLqeo2SgA//+tL4CABIDdgA== Date: Fri, 6 Dec 2019 04:15:23 +0000 Message-ID: <68445EC7-1814-48C4-B88C-9C1E00489418@vmware.com> References: <20191108093814.16032-1-vbabka@suse.cz> <20191108093814.16032-6-vbabka@suse.cz> <519D18AF-DD01-4107-96D2-D8E33058B2CB@vmware.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akaher@vmware.com; x-originating-ip: [103.19.212.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b2fa0ada-cc22-4cc4-b03c-08d77a02ea81 x-ms-traffictypediagnostic: MN2PR05MB6190:|MN2PR05MB6190:|MN2PR05MB6190: x-ld-processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0243E5FD68 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(396003)(376002)(366004)(39860400002)(199004)(189003)(6486002)(66556008)(14454004)(64756008)(66946007)(66446008)(76116006)(81156014)(81166006)(54906003)(26005)(8676002)(66476007)(102836004)(99286004)(186003)(110136005)(86362001)(6512007)(316002)(5660300002)(229853002)(91956017)(6506007)(478600001)(966005)(71190400001)(71200400001)(305945005)(4326008)(2906002)(45080400002)(36756003)(11346002)(25786009)(2616005)(76176011)(33656002)(7416002)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR05MB6190;H:MN2PR05MB6208.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: J4dl2vA+zTZtfHEFPvD/k/mSj05mhCJyUtujpsWyqStUMrQNCCwNp9moLt0fvYVR7RvJZjnkDsLMnhrl0E/abp0lW78moWXgT/piqYOcq1+P9VjApIbF4mWu5OV3OfaIaIRWWKLNfydKyvDEJJWS2D1SnVOZuHQTmdNbUUO0SPSnuZra3SYXjqrh7M7NgqMxIwFqQAHCCsccg6fSMWv9RtJ9nHWXNKtlQmFvEdUamMnQQmnl++UmDtrmmrnSd8+MsddYQih3s0YZtyWRLIMKi2V0ew71SBYe+C36JbtE6w+rzqOSeFqO00kgmN3uRoveKEYr7M9XoA5r6io3F3oEqC0uH0QPXTDT/baXUJ90X9JCVAPdGA6HzSWfVpiW2Q7idhYbXZBFKMSQ+1q0Ab7ewfJnIvI5C4nUP1s1Cynk7Fz/ZiSIA351Hydif+bpPuDTM0OSmIBst0cnpEGcT38PnVbrZDo+xikWhxrmtLhZeZ4= Content-Type: text/plain; charset="utf-8" Content-ID: <2804C14BE5A7B546A6DD675D84E5CA5A@namprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2fa0ada-cc22-4cc4-b03c-08d77a02ea81 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2019 04:15:23.6677 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Binwo4suVXwJC9yl5l7l5xmr93ykPK3U/4yqdV3JBmb8UMbPaeaXn3arU/vfPwUaCPOWBpV/eO4/ngqW558NjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR05MB6190 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCu+7v09uIDAzLzEyLzE5LCA2OjI4IFBNLCAiVmxhc3RpbWlsIEJhYmthIiA8dmJhYmthQHN1 c2UuY3o+IHdyb3RlOg0KPj4+ICAgIA0KPj4+IFsgNC40IGJhY2twb3J0OiB0aGVyZSdzIGdldF9w YWdlX2ZvbGwoKSwgc28gYWRkIHRyeV9nZXRfcGFnZSgpLWxpa2UgY2hlY2tzDQo+Pj4gICAgICAg ICAgICAgICAgIGluIHRoZXJlLCBlbmFibGVkIGJ5IGEgbmV3IHBhcmFtZXRlciwgd2hpY2ggaXMg ZmFsc2Ugd2hlcmUNCj4+PiAgICAgICAgICAgICAgIC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