Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3532738pxb; Mon, 4 Apr 2022 20:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyysicyQu4bb4Cl16lAQNr5onP3yQ1wnfCgTweSvTriD7iFM9Xgb7+NiKyC7RHQy/9uVJoL X-Received: by 2002:a17:90b:164f:b0:1c7:8d20:ff6d with SMTP id il15-20020a17090b164f00b001c78d20ff6dmr1677331pjb.64.1649128296617; Mon, 04 Apr 2022 20:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649128296; cv=none; d=google.com; s=arc-20160816; b=0patOOmPEBqGMuGqKi2h+1XoZTPZnZoc2Jr8c8YZqhWcgA8ChwoxtmG7I+s1POzBkG /izWa8NSYaE1C7azWb2e0li4GFuELxbebBX+A/aINe2ehuSNDDLHSZKbMwoWXq7NtC2/ X1t1sWvPFx1RcDaIw1GtWpQHumDD70NbQKGBzIcX1cOx4uuFFyEd4rFvvVKX4Bd+obSP cx7UAyEMwAiXqaKOLE3WpJuWrLrnqNtX32KKtqTPZoykU/HVVH5k4Uq8JCi8p3aB9KbL ML6LG+LQxwTt0BnlK5h70143C01KMzpzmUMc2XKXlY08gHgo2rg4oer3EvG2jP53oszA TXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=I+LWlYv9cz7gaJxOzL+xR1zHRqTA1ZXCYk0EA7akS3Q=; b=h0T1Ptj2q5VKHQ84u5x9w7DOIc0VczwHleITLXGgEVrJnvDoIBLd++p/A5GO05GMkm 2ILNMeP6+eYSGKuu/zmYJS6CnZInw0uuzUBwQZxsSoEHMbxVqY0S/js6TeQhdb9wwijU yJmQfMU9BFpScnw6F4H+V20g8Az7o5OC+/Yx7n4aXDwxpiGoYfg6kiosbJYR9/ux9ZKu OLlF1GfCd+SPP3k6GQ5UgPd17TJOF6YK8LdS08L2HdI8TVAYIS0JyN9OxkBCQO3pFNWM shvYtreporqNuRYR7esbCEJYTQB/jP9cQHPycueNKkY4Ygs5DatMyiijVi3H9KonFHRl L4Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KJgPqp2g; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=lVEFLsp1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f7-20020a056a00228700b004fa3a8dff5dsi14235944pfe.20.2022.04.04.20.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 20:11:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KJgPqp2g; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=lVEFLsp1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2A341753A4; Mon, 4 Apr 2022 18:11:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377751AbiDDHot (ORCPT + 99 others); Mon, 4 Apr 2022 03:44:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352836AbiDDHos (ORCPT ); Mon, 4 Apr 2022 03:44:48 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4CE36169 for ; Mon, 4 Apr 2022 00:42:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 76C391F381; Mon, 4 Apr 2022 07:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649058170; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I+LWlYv9cz7gaJxOzL+xR1zHRqTA1ZXCYk0EA7akS3Q=; b=KJgPqp2gTIdVAhpodnARX8ZFr/hA/T/hJ2qux30lf/agq7dwFaBnIXpiK+zFZlz8lyJ1Jt ZU+LtfJHQOhv+Hc6+/IF5HPURrA3btikua+yTYwXGrd2+Vio7oZFbF+LhNZMOK+8XnXC2a ZaMkenl8WZCubwPR7gcvePE5fAyVufA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649058170; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I+LWlYv9cz7gaJxOzL+xR1zHRqTA1ZXCYk0EA7akS3Q=; b=lVEFLsp17eaJoj062wqgYZ9ktKh/BXwfi4d94DCDyA7HIiF71X3LBdDtPe2Q2mLxdfanAk 1QRGCO0ipqB4VqCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4E17313216; Mon, 4 Apr 2022 07:42:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yh9YEnqhSmKGbQAAMHmgww (envelope-from ); Mon, 04 Apr 2022 07:42:50 +0000 Message-ID: <191c3fd8-b858-06b7-df1f-f2f40490d1b6@suse.cz> Date: Mon, 4 Apr 2022 09:42:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v3 2/2] mm: wrap __find_buddy_pfn() with a necessary buddy page validation. Content-Language: en-US To: Zi Yan , linux-mm@kvack.org Cc: Linus Torvalds , Steven Rostedt , David Hildenbrand , Mel Gorman , Mike Rapoport , Oscar Salvador , Andrew Morton , linux-kernel@vger.kernel.org References: <20220401230804.1658207-1-zi.yan@sent.com> <20220401230804.1658207-2-zi.yan@sent.com> From: Vlastimil Babka In-Reply-To: <20220401230804.1658207-2-zi.yan@sent.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/2/22 01:08, Zi Yan wrote: > From: Zi Yan > > Whenever the buddy of a page is found from __find_buddy_pfn(), > page_is_buddy() should be used to check its validity. Add a helper > function find_buddy_page_pfn() to find the buddy page and do the check > together. > > Suggested-by: Linus Torvalds > Link: https://lore.kernel.org/linux-mm/CAHk-=wji_AmYygZMTsPMdJ7XksMt7kOur8oDfDdniBRMjm4VkQ@mail.gmail.com/ > Signed-off-by: Zi Yan Acked-by: Vlastimil Babka Thanks.