From patchwork Mon Apr 29 05:47:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13646292 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF958C4345F for ; Mon, 29 Apr 2024 05:47:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6267B6B007B; Mon, 29 Apr 2024 01:47:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D60F6B0083; Mon, 29 Apr 2024 01:47:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C46B6B0085; Mon, 29 Apr 2024 01:47:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2FA1D6B007B for ; Mon, 29 Apr 2024 01:47:17 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A2C501A0DB6 for ; Mon, 29 Apr 2024 05:47:16 +0000 (UTC) X-FDA: 82061486472.01.279016A Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf10.hostedemail.com (Postfix) with ESMTP id 5A034C000A for ; Mon, 29 Apr 2024 05:47:13 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=yq7eDAHs; dmarc=none; spf=none (imf10.hostedemail.com: domain of BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714369635; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=SJvYXm32u+nWT3WytsBkuXdj6i0UsjWFcaJXvyE7BqM=; b=oIn6sPfu9+OALLKveYHLvrbXlNq55+ErOFxWx/fkfgrp7ofhpFLcRwP1vJRcBfsRW/USZ3 SrwtoWxHlnpo2yc0i/MWMd4E18KCLmzD9TRExxIvg5SS17PveIje/u6cdCqHMPJ1Bh7KqY dnrRVhhsqhDNJewPEKpxoYChmHZF5XQ= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=yq7eDAHs; dmarc=none; spf=none (imf10.hostedemail.com: domain of BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714369635; a=rsa-sha256; cv=none; b=nEJTjWqu0WrnNdBWCqjog/ab7jd8K9eZPpNiPaeVm0PFDYnT8IooPxLxn8kyx+hrbRVgbO VkkThN2Men2yvnPwkylJuCY2HYTqLSsT36nAT5z1r74nsHfObD3Qh/UXVqaaRPKvYcS3ID QfcshQokcjubdnG+3VFUfLNOWVrdwqI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=SJvYXm32u+nWT3WytsBkuXdj6i0UsjWFcaJXvyE7BqM=; b=yq7eDAHs3hj2ncu+ItRPuqcnBL upMzkA/OMiBiARGwRBnjYV/LFX6pUNh/Zx7zQQtTowiwMyF1ocXQu3WPhm4bDCCs3+vHBTnDBuWx0 Sk76sfg9CULFZOiFORejMSc+FLPyzC4GJuX6Aba5Vlg2fPo3Znw3qcgj+P6DbR3cC+TDmHzeqSDCW nENHB54KEDiK0Iky2BM4wbqOV0YLDWPxNj6BrHWJVTxJtDluUWJWHABhwomSYlVWnt6Oo6wjsvRU6 JTxRF+yPiKrUMgATAhiEXcN4vcTc8pil4nBiHzplsv7THhSJAcQiOXcnsnMpEIoqStEh89SilrU2C nHVDfDHA==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Jr2-00000001Xz5-34kC; Mon, 29 Apr 2024 05:47:09 +0000 From: Christoph Hellwig To: akpm@linux-foundation.org, osalvador@suse.de Cc: elver@google.com, vbabka@suse.cz, andreyknvl@gmail.com, linux-mm@kvack.org, djwong@kernel.org, david@fromorbit.com, linux-xfs@vger.kernel.org Subject: [PATCH] mm,page_owner: don't remove GFP flags in add_stack_record_to_list Date: Mon, 29 Apr 2024 07:47:06 +0200 Message-Id: <20240429054706.1543980-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 5A034C000A X-Stat-Signature: yyxucaq8qfif9mepx19z9ur3qw6daonq X-HE-Tag: 1714369633-170178 X-HE-Meta: U2FsdGVkX18UhSKStfvIWZiNDz2OhoD1pMLC4srE92j5jUtZPJXkLg1KMFnxJfb8Vc4X7lYae2tPwtTGmGbsI2EI1Kj9A5ZFkF1WJk0HrkMTpIU/pn7lGYls72TFc8hqiqBZatyU0dgq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G3DJQSdAm0Cn++wzLJhWX7RrK81uPMA4wPSx+iZ/essvsAOTSQlPmo3ysKYh0Ek6HdB4gLbUM9A1rcFbk+qsWw+i5V9Q16NeXD8lAncWtiRF2n9IHgLQW1WbHpKRybCMaIamluZ8I3LCko0A1riIVuZ+MH4x7JnyBVqI9p/N6Jku9Q7LqzwTYO9xdoD/IJ5cO66BWBRcK7+atHVT2Fo7OPQB1lfr++eFhXzWRYZnwnG35PqwgT0bXr7D0Kdp6iPfquCu46irnCmeKcOLpk2fTbsGRof6k4OK15f+xuzEVcZiT00mVpWEaDC2i3OMjYfdgbvmJh+vq36BzEyeVDE+ 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: List-Subscribe: List-Unsubscribe: This loses flags like GFP_NOFS and GFP_NOIO that are important to avoid deadlocks as well as GFP_NOLOCKDEP that otherwise generates lockdep false positives. Fixes: 217b2119b9e2 ("mm,page_owner: implement the tracking of the stacks count") Reported-by: Reported-by: syzbot+b7e8d799f0ab724876f9@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig --- mm/page_owner.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index d17d1351ec84af..d214488846fa92 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -168,9 +168,7 @@ static void add_stack_record_to_list(struct stack_record *stack_record, unsigned long flags; struct stack *stack; - /* Filter gfp_mask the same way stackdepot does, for consistency */ gfp_mask &= ~GFP_ZONEMASK; - gfp_mask &= (GFP_ATOMIC | GFP_KERNEL); gfp_mask |= __GFP_NOWARN; set_current_in_page_owner();