From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Oscar Salvador <osalvador@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Lei Yang <leiyang@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
Marco Elver <elver@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH] mm,page_owner: Fix recursion
Date: Thu, 14 Mar 2024 12:01:24 +0900 [thread overview]
Message-ID: <2ff96a50-fc65-4e42-b15d-097c0f15a455@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20240313234245.18824-1-osalvador@suse.de>
On 2024/03/14 8:42, Oscar Salvador wrote:
> Prior to 217b2119b9e2 ("mm,page_owner: implement the tracking of the stacks count")
> the only place where page_owner could potentially go into recursion due to
> its need of allocating more memory was in save_stack(), which ends up calling
> into stackdepot code with the possibility of allocating memory.
>
> We made sure to guard against that by signaling that the current task was
> already in page_owner code, so in case a recursion attempt was made, we
> could catch that and return dummy_handle.
>
> After above commit, a new place in page_owner code was introduced where we
> could allocate memory, meaning we could go into recursion would we take that
> path.
>
> Make sure to signal that we are in page_owner in that codepath as well.
> Move the guard code into two helpers {un}set_current_in_page_owner()
> and use them prior to calling in the two functions that might allocate
> memory.
>
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> Fixes: 217b2119b9e2 ("mm,page_owner: implement the tracking of the stacks count")
Maybe culprit for a page owner refcount bug reported at
https://syzkaller.appspot.com/bug?id=8e4e66dfe299a2a00204ad220c641daaf1486a00 , for
that commit went to next-20240214 and syzbot started failing to test since next-20240215 ?
Please send this patch to linux-next.git as soon as possible (or can someone experiencing
this bug try booting linux-next.git with this patch applied, so that we can check whether
syzbot can resume testing linux-next.git), and then send to linux.git together (so that
various trees which depend on linux.git won't start failing to boot).
next prev parent reply other threads:[~2024-03-14 3:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 23:42 Oscar Salvador
2024-03-13 23:46 ` Oscar Salvador
2024-03-14 3:01 ` Tetsuo Handa [this message]
2024-03-14 5:47 ` Oscar Salvador
2024-03-14 7:01 ` Oscar Salvador
2024-03-19 10:51 ` Tetsuo Handa
2024-03-15 13:07 ` 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=2ff96a50-fc65-4e42-b15d-097c0f15a455@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=leiyang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=vbabka@suse.cz \
/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