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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 B726DC43461 for ; Wed, 5 May 2021 13:45:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2C34D613C3 for ; Wed, 5 May 2021 13:45:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C34D613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 95AF16B006C; Wed, 5 May 2021 09:45:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90ADA6B006E; Wed, 5 May 2021 09:45:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7AB886B0070; Wed, 5 May 2021 09:45:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id 616CB6B006C for ; Wed, 5 May 2021 09:45:52 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 14B34181AF5C3 for ; Wed, 5 May 2021 13:45:52 +0000 (UTC) X-FDA: 78107300544.01.0591B6F Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf07.hostedemail.com (Postfix) with ESMTP id A1539A0009EC for ; Wed, 5 May 2021 13:45:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1620222350; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zmxur1kgzuevsre8s/5Lx5vP8+P1yeG3cdZsfEJFfbI=; b=e9SF9KizJ6skQ3SZqBMxV9jRhsS9xJskcYraE7q5zDy20XZbIx9mgQGPLYTnnz6IkdnBFE mbwJODkGnxRAELnkaaE6ybeyPhOe/alOTs9q6Hv5usMLRcwnF3mSOyJPWwavA6eL2vXm3P syN4KPLO/yREBYmukxjyUUZFSWkQ8hY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3B76EADB3; Wed, 5 May 2021 13:45:50 +0000 (UTC) Date: Wed, 5 May 2021 15:45:47 +0200 From: Michal Hocko To: David Hildenbrand Cc: Andrew Morton , linux-kernel@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , Alexey Dobriyan , Mike Rapoport , "Matthew Wilcox (Oracle)" , Oscar Salvador , Roman Gushchin , Alex Shi , Steven Price , Mike Kravetz , Aili Yao , Jiri Bohac , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Naoya Horiguchi , linux-hyperv@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1 3/7] mm: rename and move page_is_poisoned() Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57ac524c-b49a-99ec-c1e4-ef5027bfb61b@redhat.com> Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=e9SF9Kiz; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf07.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Stat-Signature: bnp9gdwgishbsig5wh7w9y9kn36tu9eu X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A1539A0009EC Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620222349-819687 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. -- Michal Hocko SUSE Labs