From: Marco Elver <elver@google.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: syzbot <syzbot+ffe71f1ff7f8061bcc98@syzkaller.appspotmail.com>,
akpm@linux-foundation.org, dvyukov@google.com,
glider@google.com, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
syzkaller-bugs@googlegroups.com,
Roman Gushchin <roman.gushchin@linux.dev>,
cgroups@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>
Subject: Re: [syzbot] WARNING in __kfence_free
Date: Fri, 22 Apr 2022 12:37:48 +0200 [thread overview]
Message-ID: <CANpmjNPyBV8RCXf_=4oOvkLCavmgeLKw9w3M4zQEFcNMG7RCDg@mail.gmail.com> (raw)
In-Reply-To: <YmI4d8xR3tafv2Cq@FVFYT0MHHV2J.usts.net>
On Fri, 22 Apr 2022 at 07:09, Muchun Song <songmuchun@bytedance.com> wrote:
>
> On Thu, Apr 21, 2022 at 11:12:17AM +0200, Marco Elver wrote:
> > On Thu, Apr 21, 2022 at 01:58AM -0700, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following issue on:
> > >
> > > HEAD commit: 559089e0a93d vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLO..
> > > git tree: upstream
> > > console output: https://syzkaller.appspot.com/x/log.txt?x=10853220f00000
> > > kernel config: https://syzkaller.appspot.com/x/.config?x=2e1f9b9947966f42
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=ffe71f1ff7f8061bcc98
> > > compiler: aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > > userspace arch: arm64
> > >
> > > Unfortunately, I don't have any reproducer for this issue yet.
> > >
> > > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > > Reported-by: syzbot+ffe71f1ff7f8061bcc98@syzkaller.appspotmail.com
> > >
> > > ------------[ cut here ]------------
> > > WARNING: CPU: 0 PID: 2216 at mm/kfence/core.c:1022 __kfence_free+0x84/0xc0 mm/kfence/core.c:1022
> >
> > That's this warning in __kfence_free:
> >
> > #ifdef CONFIG_MEMCG
> > KFENCE_WARN_ON(meta->objcg);
> > #endif
> >
> > introduced in 8f0b36497303 ("mm: kfence: fix objcgs vector allocation").
> >
> > Muchun, are there any circumstances where the assumption may be broken?
> > Or a new bug elsewhere?
>
> meta->objcg always should be NULL when reaching __kfence_free().
> In theory, meta->objcg should be cleared via memcg_slab_free_hook().
>
> I found the following code snippet in do_slab_free().
>
> /* memcg_slab_free_hook() is already called for bulk free. */
> if (!tail)
> memcg_slab_free_hook(s, &head, 1);
>
> The only posibility is @tail is not NULL, which is the case of
> kmem_cache_free_bulk(). However, here the call trace is kfree(),
> it seems to be impossible that missing call memcg_slab_free_hook().
Fair enough - we can probably wait for the bug to reoccur on another
instance, and until then assume something else wrong. What is slightly
suspicious is that it only occurred once on a QEMU TCG arm64 MTE
instance.
Thanks,
-- Marco
next prev parent reply other threads:[~2022-04-22 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 8:58 syzbot
2022-04-21 9:12 ` Marco Elver
2022-04-22 5:09 ` Muchun Song
2022-04-22 10:37 ` Marco Elver [this message]
2022-04-22 6:06 ` Zhang, Qiang1
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='CANpmjNPyBV8RCXf_=4oOvkLCavmgeLKw9w3M4zQEFcNMG7RCDg@mail.gmail.com' \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=cgroups@vger.kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=roman.gushchin@linux.dev \
--cc=songmuchun@bytedance.com \
--cc=syzbot+ffe71f1ff7f8061bcc98@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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