From: Muchun Song <songmuchun@bytedance.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: syzbot <syzbot+f8c45ccc7d5d45fc5965@syzkaller.appspotmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: [syzbot] general protection fault in list_lru_add
Date: Sun, 27 Mar 2022 13:27:17 +0800 [thread overview]
Message-ID: <CAMZfGtWzk2+yJd0vHWvokknBhWVfyauRZBvxbkFoDsngOK8MzA@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wii1peDbW+eZipUnLmU_STXx6Vm30PiQnjhfUmgYrSd+Q@mail.gmail.com>
On Sat, Mar 26, 2022 at 4:29 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Fri, Mar 25, 2022 at 2:52 AM Muchun Song <songmuchun@bytedance.com> wrote:
> >
> > We can see that we put the dentry (ffff88807ebda0f8) into
> > the list_lru (ffff888011bd47f0). But we do not allocate struct
> > list_lru_one for the memcg (ffff88801c530000). Then it panics.
>
> Hmm.
>
> Looking at memcg_slab_pre_alloc_hook(), I note that it will return
> success without doing the LRU checking for several cases.
>
> So since you can reproduce the problem, I would suggest you add some
> debug code to __d_alloc() that prints out something big if it gets a
> dentry but you can't look up the list_lru_one() for that dentry.
>
> Hmm?
>
> The only other situation I can think of is if dentry->d_sb were to
> change during the dentry lifetime, but I don't think that can happen.
> The only assignment I can find with "git grep" is that
>
> dentry->d_sb = sb;
>
> in __d_alloc(), and while it's possible my grep pattern was bogus, it
> sounds unlikely.
>
I have found the root cause, it was caused by kfence. Here is
the fix patch [1].
[1] https://lore.kernel.org/all/20220327051853.57647-1-songmuchun@bytedance.com/
Thanks.
prev parent reply other threads:[~2022-03-27 5:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 22:03 syzbot
[not found] ` <CAHk-=wjLL3OB8PvFGBLgUs=zip-Q2m1P=UwG+Pw_E8nYDs+MUw@mail.gmail.com>
2022-03-24 2:18 ` Muchun Song
[not found] ` <CAHk-=wgW1hEUaQeX41+3w7AGsXkeE1XOXCMndXs3kFp-XjSVzQ@mail.gmail.com>
2022-03-24 8:44 ` Muchun Song
2022-03-24 8:50 ` Dmitry Vyukov
2022-03-24 16:12 ` Muchun Song
2022-03-24 16:18 ` Dmitry Vyukov
2022-03-24 16:38 ` Muchun Song
2022-03-24 19:44 ` syzbot
2022-03-24 19:41 ` syzbot
[not found] ` <CAHk-=whxaFX4nqnE-SLHTGKyqejvbrhYx5sagcxWd+UWCMf8dg@mail.gmail.com>
[not found] ` <CAHk-=wg++3S5Cvks-4xFCrD7qgZDibc5aMS4Bt=Pemm7FnOBZA@mail.gmail.com>
2022-03-25 1:43 ` Muchun Song
2022-03-25 4:49 ` syzbot
2022-03-25 5:47 ` Fabio M. De Francesco
2022-03-25 9:51 ` Muchun Song
[not found] ` <CAHk-=wii1peDbW+eZipUnLmU_STXx6Vm30PiQnjhfUmgYrSd+Q@mail.gmail.com>
2022-03-27 5:27 ` Muchun Song [this message]
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=CAMZfGtWzk2+yJd0vHWvokknBhWVfyauRZBvxbkFoDsngOK8MzA@mail.gmail.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=syzbot+f8c45ccc7d5d45fc5965@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.org \
/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