From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Oscar Salvador <osalvador@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
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>,
syzbot+41bbfdb8d41003d12c0f@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 1/2] mm,page_owner: Fix refcount imbalance
Date: Wed, 20 Mar 2024 18:42:52 +0900 [thread overview]
Message-ID: <2b75a26f-6c8b-40b3-8ea7-d2cf275b58fe@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <Zfp40dsYSlCouvJW@localhost.localdomain>
On 2024/03/20 14:49, Oscar Salvador wrote:
> This should have the follwing on top:
>
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 2613805cb665..e477a71d6adc 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -222,8 +222,11 @@ static void dec_stack_record_count(depot_stack_handle_t handle,
> {
> struct stack_record *stack_record = __stack_depot_get_stack_record(handle);
>
> - if (stack_record)
> - refcount_sub_and_test(nr_base_pages, &stack_record->count);
> + if (!stack_record)
> + return;
> +
> + if (refcount_sub_and_test(nr_base_pages, &stack_record->count))
> + WARN(1, "%s refcount went to 0 for %u handle\n", __func__, handle);
> }
>
>
That fixed this problem. Thank you.
-------- Forwarded Message --------
Date: Wed, 20 Mar 2024 01:31:03 -0700
In-Reply-To: <4362246e-d804-43de-800b-a7840b70919a@I-love.SAKURA.ne.jp>
Message-ID: <000000000000410e3b061413692b@google.com>
Subject: Re: [syzbot] [mm?] WARNING: refcount bug in __reset_page_owner
From: syzbot <syzbot+98c1a1753a0731df2dd4@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, penguin-kernel@i-love.sakura.ne.jp, syzkaller-bugs@googlegroups.com
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+98c1a1753a0731df2dd4@syzkaller.appspotmail.com
Tested on:
commit: a4145ce1 Merge tag 'bcachefs-2024-03-19' of https://ev..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=131b1d66180000
kernel config: https://syzkaller.appspot.com/x/.config?x=9f47e8dfa53b0b11
dashboard link: https://syzkaller.appspot.com/bug?extid=98c1a1753a0731df2dd4
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=13972985180000
Note: testing is done by a robot and is best-effort only.
next prev parent reply other threads:[~2024-03-20 9:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 18:32 [PATCH v2 0/2] page_owner: Refcount fixups Oscar Salvador
2024-03-19 18:32 ` [PATCH v2 1/2] mm,page_owner: Fix refcount imbalance Oscar Salvador
2024-03-19 23:24 ` Andrew Morton
2024-03-20 4:40 ` Tetsuo Handa
2024-03-20 5:49 ` Oscar Salvador
2024-03-20 9:42 ` Tetsuo Handa [this message]
2024-03-20 17:35 ` kernel test robot
2024-03-20 23:37 ` kernel test robot
2024-03-21 10:36 ` Vlastimil Babka
2024-03-19 18:32 ` [PATCH v2 2/2] mm,page_owner: Fix accounting of pages when migrating Oscar Salvador
2024-03-19 18:48 ` Matthew Wilcox
2024-03-20 5:00 ` Oscar Salvador
2024-03-21 10:50 ` Vlastimil Babka
2024-03-21 11:07 ` Oscar Salvador
2024-03-21 11:20 ` Vlastimil Babka
2024-03-21 11:54 ` Oscar Salvador
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=2b75a26f-6c8b-40b3-8ea7-d2cf275b58fe@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=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=syzbot+41bbfdb8d41003d12c0f@syzkaller.appspotmail.com \
--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