Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3853857ybl; Mon, 9 Dec 2019 00:55:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzSr0pLVfQ5+peXZEzr+o6IRPPRLfVYBrfMgUZaJIIFdDVyWs+L40HxayhPAgHlk+93jYpb X-Received: by 2002:a9d:6c85:: with SMTP id c5mr19968485otr.164.1575881757406; Mon, 09 Dec 2019 00:55:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575881757; cv=pass; d=google.com; s=arc-20160816; b=0rRUTYLz7N0Qzzaj9UXA/miC3qht5Ukva3Wi6qnLjesjsvEqWpuGaoDOpAUtH7LAYK 1hdLgiLQz6BbbnFRslcyNv5wqPEsGcaHHB3ZBKsSDoLUuAyu8JctsYXH7nwTvc3Uwe9Z Fdkv3wfZDrD3nLBXLBSTWX1iVms63UHm3yGPm4fT8GQYbNTiXJ6xngzyzJruxKpMGdJx gsB4maSrKN/UmtHJGwkX1ySQVSh0wEFaR0+BqpwuQI4JjGcNWqK0ofD9ES1eQGZYl283 vn6PkZHx2quDw8CQVOQfaB2Msvv1Lcu7nwBXh+JKXeBVNoNsaS4N1ZRlVMtS0WLccPCt Z36Q== 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=JFiVCoN3WXXtSv9yf9QhPUkjoDQogUvAHD0K82jNxNY=; b=bFWZnfzixevSSxB3HijYjZt4HCRcw+56FBam3ihQ4991W2PTMWoUVGlZTdtPzuv2Dk IGozyalLUhe4DUflsDm+5ptp+StfKPfCET4jVrypgHaiTQK32MZkM3sTMAZRpWsX5uAX uF30+FTRdR0QNPsixzGz6Pt1c+3iikcrVnZjwF77IaOI06zkkqpOFtejc+XILxWKFm5/ 5bKZEbxjKiBuhv7fnJP+GWwWc1fli22cvN0vMMW2EpZlD+UwARtICjyGKmoSSRRpfdJg D+LX0ySBELq6vY3j/7eLrDPuOd4c3jTUUkUSiu+HgSvGxrPiZzRzgdxj0L2vEozmekHP jSZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vmware.com header.s=selector2 header.b=hGCnm5cP; 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 n139si11903345oig.121.2019.12.09.00.55.45; Mon, 09 Dec 2019 00:55:57 -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=hGCnm5cP; 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 S1727229AbfLIIzA (ORCPT + 99 others); Mon, 9 Dec 2019 03:55:00 -0500 Received: from mail-dm6nam10on2052.outbound.protection.outlook.com ([40.107.93.52]:6034 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727044AbfLIIzA (ORCPT ); Mon, 9 Dec 2019 03:55:00 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cEw83s9vsTzHg46GEt170rGMSaayOa35eRXbqf1ECvcgu3vRkPHxEx95uOTzkgLpkrBuoZmugteJYudxitFw1in1Z00+XAWXXNtwBs1MbI6pCGaJHozFe2xiaIgSr/EEtoc9E9CQqm4PVDZTQegBuGjZxJHlMk9BbRF/1tUM/1QPmoHxTdDp/Nd14uPTx7OurBCKYYn13VyRVUGtc1upgNtOBsAsEjFYI175QAIBWxeYw7yavjddJoX40QEofezVrbTYnUlnFeSUVPkyQZ+WYgdU7vw6aXIk4nq3zHiXLfO21SVfDkTQyo5GpwhzgRaYWE4Bd5GuqmJP3fUscQ+fKg== 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=JFiVCoN3WXXtSv9yf9QhPUkjoDQogUvAHD0K82jNxNY=; b=MvF5AFZMDY5JiccUK/6PfP/EQ7Q+2KqEWR9c3aVlkE64NTT7o4dRNL0ftSfsDySZPXyUXIv9UQSVB2CgbOAIhjykfKmw40YJA7oK9e02kDp6cqoSmo3szMlkNmPyvCKXP/gsRqd1iCMmwV8TJYPC9jfT8l68BmbabWI4vJXm6dolinJTGy+Ou+/c7OSSiydRdUjvaxVfxrhCClsier/q3iaRCQYhKI68+uPxL9biE2XPImYqy9U2WP7WDlJ4UKZgXnEt5ZcFLrUPY7ztU0i2/ykegd4vCzLtDjskoIDcCSGx55wA7StnFQo/OPc3fYbsYV76rqmSQwePoDh9pTR3FQ== 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=JFiVCoN3WXXtSv9yf9QhPUkjoDQogUvAHD0K82jNxNY=; b=hGCnm5cPZu/ALl5X8bZaPRHeT9c0IAR3SDH5tpmpQVL/U5sKrDcI1mEAhsE3YHzzOtEh1onteMXnjDShee+7rd3l3tXBtQ0bWZFLH4QFXuzAA1jkojdPMHjWnfqtHPdLM+UBBUsLRlTeh6vm2D2C0mw52Jc+gZa+o6xmBErlnKg= Received: from MN2PR05MB6208.namprd05.prod.outlook.com (20.178.241.91) by MN2PR05MB6045.namprd05.prod.outlook.com (20.178.243.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14; Mon, 9 Dec 2019 08:54:56 +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.012; Mon, 9 Dec 2019 08:54:56 +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//+tL4CABIDdgIAAUH2AgAS08AA= Date: Mon, 9 Dec 2019 08:54:55 +0000 Message-ID: <64284E33-3828-46E9-AFFB-649E0DA41023@vmware.com> References: <20191108093814.16032-1-vbabka@suse.cz> <20191108093814.16032-6-vbabka@suse.cz> <519D18AF-DD01-4107-96D2-D8E33058B2CB@vmware.com> <68445EC7-1814-48C4-B88C-9C1E00489418@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: 330aba53-9465-4c12-aea7-08d77c8576cc x-ms-traffictypediagnostic: MN2PR05MB6045:|MN2PR05MB6045:|MN2PR05MB6045: 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: 02462830BE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(346002)(136003)(39860400002)(376002)(366004)(189003)(199004)(6486002)(966005)(6512007)(91956017)(478600001)(76176011)(76116006)(66446008)(64756008)(66556008)(66476007)(45080400002)(66946007)(71200400001)(71190400001)(229853002)(186003)(33656002)(2616005)(54906003)(110136005)(86362001)(4326008)(7416002)(316002)(305945005)(8936002)(102836004)(5660300002)(81166006)(81156014)(8676002)(99286004)(36756003)(26005)(53546011)(6506007)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR05MB6045;H:MN2PR05MB6208.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A: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: 0ne5uX2n+2gTAJoMYiQLVK2flmX+b0COBPuBwgR5EVOnTs6IdPrgaGw3UKUYFLUKM8C7nEJckCzTSLQRQKUnIh5JUB7u6l/2Mjw7QM6WFSnYBXG28miqJ7jI4b7th5uTNZL8peAaj9ACMPVoMErhxA8WX8nNmuOxVIdmfPBr4PC/oAgM7gjbQYvZmivA7p9oL+cH1J8mQ+TPw4dvwdMS33TLiEI7DO1lHCgxABH9f9tnzpg654mcFWGi8wCrG39AO/2WeRB8gumFMQtnCs+hfYaazsL0LYxnglFY6BSAPqj0IvxmxRiniEd7lca3ASUGqlocUDfzD8gQKN0JHy+C3EvnhipzzE4GXubXUMsDcEUr8rXePlFrjocTGBzfrtfC9jGlq6o2IbsHAQPs7zbPHc2O5AgRpDjEztLTofecnIl7d3qMXtHsGajjtIw1jtHqz7LKVZtz5rGEK2fKo2YS9Ob843ZkStzkeIxNJ/ysWBc= Content-Type: text/plain; charset="utf-8" Content-ID: <98FC6CCB6D3B3A4BABA7314599B3EA05@namprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 330aba53-9465-4c12-aea7-08d77c8576cc X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Dec 2019 08:54:56.0415 (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: PKLXpZPNKxpt2Xnd4KhlADcG+WziCDLSUQ+c/nf5F1KyewyFUFI6Rih8toFf2xy8zDtRF2Gy57XRhoJSqVb6bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR05MB6045 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCu+7v09uIDA2LzEyLzE5LCA4OjAyIFBNLCAiVmxhc3RpbWlsIEJhYmthIiA8dmJhYmthQHN1 c2UuY3o+IHdyb3RlOg0KDQo+IE9uIDEyLzYvMTkgNToxNSBBTSwgQWpheSBLYWhlciB3cm90ZToN Cj4+IA0KPj4gDQo+PiBPbiAwMy8xMi8xOSwgNjoyOCBQTSwgIlZsYXN0aW1pbCBCYWJrYSIgPHZi YWJrYUBzdXNlLmN6PiB3cm90ZToNCj4+Pj4+ICAgIA0KPj4+Pj4gWyA0LjQgYmFja3BvcnQ6IHRo ZXJlJ3MgZ2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