From: Vlastimil Babka <vbabka@suse.cz>
To: Christoph Hellwig <hch@lst.de>,
akpm@linux-foundation.org, osalvador@suse.de
Cc: elver@google.com, andreyknvl@gmail.com, linux-mm@kvack.org,
djwong@kernel.org, david@fromorbit.com,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH] mm,page_owner: don't remove GFP flags in add_stack_record_to_list
Date: Mon, 29 Apr 2024 09:59:43 +0200 [thread overview]
Message-ID: <3e486c7f-57d4-4a36-a949-0cf19f10bf4f@suse.cz> (raw)
In-Reply-To: <20240429054706.1543980-1-hch@lst.de>
On 4/29/24 7:47 AM, Christoph Hellwig wrote:
> 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.
GFP_NOFS and GFP_NOIO translate to GFP_KERNEL without __GFP_FS/__GFP_IO so I
don't see how this patch would have helped with those.
__GFP_NOLOCKDEP is likely the actual issue and stackdepot solved it like this:
https://lore.kernel.org/linux-xfs/20240418141133.22950-1-ryabinin.a.a@gmail.com/
So we could just do the same here.
> 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 <hch@lst.de>
> ---
> 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();
next prev parent reply other threads:[~2024-04-29 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 5:47 Christoph Hellwig
2024-04-29 7:59 ` Vlastimil Babka [this message]
2024-04-29 23:49 ` Dave Chinner
2024-04-30 5:31 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e486c7f-57d4-4a36-a949-0cf19f10bf4f@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=elver@google.com \
--cc=hch@lst.de \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=osalvador@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox