Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91B92C43217 for ; Fri, 12 Nov 2021 12:56:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A7EE61078 for ; Fri, 12 Nov 2021 12:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235007AbhKLM7p (ORCPT ); Fri, 12 Nov 2021 07:59:45 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4091 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234881AbhKLM7n (ORCPT ); Fri, 12 Nov 2021 07:59:43 -0500 Received: from fraeml713-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HrJPl25CZz67NsT; Fri, 12 Nov 2021 20:51:55 +0800 (CST) Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by fraeml713-chm.china.huawei.com (10.206.15.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 12 Nov 2021 13:56:50 +0100 Received: from fraeml714-chm.china.huawei.com ([10.206.15.33]) by fraeml714-chm.china.huawei.com ([10.206.15.33]) with mapi id 15.01.2308.015; Fri, 12 Nov 2021 13:56:50 +0100 From: Roberto Sassu To: Ajay Garg CC: "ebiggers@kernel.org" , "tytso@mit.edu" , "corbet@lwn.net" , "viro@zeniv.linux.org.uk" , "hughd@google.com" , "akpm@linux-foundation.org" , "linux-fscrypt@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-integrity@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RFC][PATCH 4/5] shmem: Avoid segfault in shmem_read_mapping_page_gfp() Thread-Topic: [RFC][PATCH 4/5] shmem: Avoid segfault in shmem_read_mapping_page_gfp() Thread-Index: AQHX18MROltj/rJe+kKE1cDtluXUoav/yFuAgAARW5A= Date: Fri, 12 Nov 2021 12:56:50 +0000 Message-ID: <5b4ea24c3c104e74a2cae4cf0b90eaa3@huawei.com> References: <20211112124411.1948809-1-roberto.sassu@huawei.com> <20211112124411.1948809-5-roberto.sassu@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.204.63.33] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBBamF5IEdhcmcgW21haWx0bzphamF5Z2FyZ25zaXRAZ21haWwuY29tXQ0KPiBTZW50 OiBGcmlkYXksIE5vdmVtYmVyIDEyLCAyMDIxIDE6NTQgUE0NCj4gSGkgUm9iZXJ0by4NCj4gDQo+ IElkZW50aWNhbCBwYXRjaCBoYXMgYmVlbiBmbG9hdGVkIGVhcmxpZXIgdmlhIDoNCj4gaHR0cHM6 Ly9sb3JlLmtlcm5lbC5vcmcvbGludXgtDQo+IG1tL0NBTVpmR3RVcDZka1Q0T1d6TGhMOHdocU5u WEFiZlZ3NWM2QVFvZ0h6WTNiYk1fazJRd0BtYWlsLg0KPiBnbWFpbC5jb20vVC8jbTIxODlkMTM1 YjkyOTNkZTliNGExMTM2MmYwMTc5YzE3YjI1NGQ1YWINCg0KSGkgQWpheQ0KDQp0aGFua3MsIEkg d2FzIG5vdCBhd2FyZS4NCg0KUm9iZXJ0bw0KDQpIVUFXRUkgVEVDSE5PTE9HSUVTIER1ZXNzZWxk b3JmIEdtYkgsIEhSQiA1NjA2Mw0KTWFuYWdpbmcgRGlyZWN0b3I6IExpIFBlbmcsIF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