From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 212F3C433B4 for ; Thu, 6 May 2021 01:08:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9C7361159 for ; Thu, 6 May 2021 01:08:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbhEFBJT (ORCPT ); Wed, 5 May 2021 21:09:19 -0400 Received: from mail.kingsoft.com ([114.255.44.146]:3060 "EHLO mail.kingsoft.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229465AbhEFBJP (ORCPT ); Wed, 5 May 2021 21:09:15 -0400 X-Greylist: delayed 719 seconds by postgrey-1.27 at vger.kernel.org; Wed, 05 May 2021 21:09:15 EDT X-AuditID: 0a580155-c83ff700000401e3-45-6093417f4c7f Received: from mail.kingsoft.com (localhost [10.88.1.79]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-2-NODE-85) with SMTP id 85.BA.00483.F7143906; Thu, 6 May 2021 09:08:15 +0800 (HKT) Received: from alex-virtual-machine (10.88.1.103) by KSBJMAIL4.kingsoft.cn (10.88.1.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 6 May 2021 09:08:13 +0800 Date: Thu, 6 May 2021 09:08:07 +0800 From: Aili Yao To: Michal Hocko CC: David Hildenbrand , Andrew Morton , , "Michael S. Tsirkin" , Jason Wang , "Alexey Dobriyan" , Mike Rapoport , "Matthew Wilcox (Oracle)" , Oscar Salvador , Roman Gushchin , Alex Shi , "Steven Price" , Mike Kravetz , "Jiri Bohac" , "K. Y. Srinivasan" , "Haiyang Zhang" , Stephen Hemminger , Wei Liu , Naoya Horiguchi , , , , , Subject: Re: [PATCH v1 3/7] mm: rename and move page_is_poisoned() Message-ID: <20210506090807.5a7b8691@alex-virtual-machine> In-Reply-To: References: <20210429122519.15183-1-david@redhat.com> <20210429122519.15183-4-david@redhat.com> <0710d8d5-2608-aeed-10c7-50a272604d97@redhat.com> <57ac524c-b49a-99ec-c1e4-ef5027bfb61b@redhat.com> Organization: kingsoft X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.88.1.103] X-ClientProxiedBy: KSBJMAIL1.kingsoft.cn (10.88.1.31) To KSBJMAIL4.kingsoft.cn (10.88.1.79) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsXCFcHor1vvODnBYNcfPYvpjV4Wc9avYbNY d7yL2eLr+l9AYtIFNotr2z0sll36zGRx4+BmNosnq7eyW+zZe5LFYurED2wWl3fNYbO4t+Y/ q8X9PgeLj/uDLf7/esVqcbHxAKPFmWlFFkfWb2eyaDzyns3i7eGDzBbLz85jszi86RaTxe8f QI3PWq+yOEh6rJm3htFjYvM7do+ds+6ye2xeoeWxaVUnm8emT5PYPU7M+M3isfOhpcfkG8sZ PVp3/GX3eHF1I4vHx6e3WDze77vK5rF+y1UWjzMLjgB1nq4OEIzisklJzcksSy3St0vgynje m1RwjqPi3hypBsbDbF2MnBwSAiYSbzYeZu5i5OIQEpjOJDF16j92COcZo8THtU+BMhwcLAIq EieWRYA0sAmoSuy6N4sVxBYRUJLo2ryTDaSeWaCdXaLj+wywhLCAk8Tx5zcZQWxeASuJlTf3 gcU5BfQkbk55zgSxYCuTxMSGxSwgCX4BMYneK/+ZQJZJCNhLPF6vCNErKHFy5hOwEmYBHYkT q44xQ9jyEtvfzgGzhQQUJQ4v+cUO8Y28xN3f0xkh7FiJpgO32CYwCs9CMmoWklGzkIxawMi8 ipGlODfdaBMjJDmE7mCc0fRR7xAjEwfjIUYJDmYlEd6Ctf0JQrwpiZVVqUX58UWlOanFhxil OViUxHnZC7sShATSE0tSs1NTC1KLYLJMHJxSDUzLRXWXLGk6reP3V4nz66O/KW/XMMlExEm2 yrRsTS7fWnAqv6sgZ49Lmnj20kfJYQUfNJ4JTHc0l1i5bY6vyAORj8t+SRYKbzz17LiQ0Lop V90t9a+evPtgG3Pynl0m6mcfCBzduzI9/ueUpGm9C9jObfb8vO3a8SeWn/9aVwqtfKQ4x+Ty 0Vm3ZRbVy4fKagjscW/h/7urkFniRNllMVmutuNL3zJkH+oMUf/mqn1SWP+aSeztP/IH9f7s elSZerCsYiNvqYEA1+es1iPqKZVWHsfqxDllT7y7bxog1swSIHrvUXbmXF/x8qTtae5unAkW 9eo+56ttDXPvPljXstZk55zwx3La6i27+K9J7FBiKc5INNRiLipOBAAQjQW8fQMAAA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 May 2021 15:45:47 +0200 Michal Hocko wrote: > On Wed 05-05-21 15:39:08, David Hildenbrand wrote: > > > > Long story short, this should be good enough for the cases we actually can > > > > handle? What am I missing? > > > > > > I am not sure I follow. My point is that I fail to see any added value > > > of the check as it doesn't prevent the race (it fundamentally cannot as > > > the page can be poisoned at any time) but the failure path doesn't > > > put_page which is incorrect even for hwpoison pages. > > > > Oh, I think you are right. If we have a page and return NULL we would leak a > > reference. > > > > Actually, we discussed in that thread handling this entirely differently, > > which resulted in a v7 [1]; however Andrew moved forward with this > > (outdated?) patch, maybe that was just a mistake? > > > > Yes, I agree we should revert that patch for now. > > OK, Let me send the revert to Andrew. > Got this! Anyway, I will try to post a new patch for this issue based on the previous patch v7. Thanks! Aili Yao