[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wii1peDbW+eZipUnLmU_STXx6Vm30PiQnjhfUmgYrSd+Q@mail.gmail.com>
Date: Fri, 25 Mar 2022 13:29:02 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Muchun Song <songmuchun@...edance.com>
Cc: syzbot <syzbot+f8c45ccc7d5d45fc5965@...kaller.appspotmail.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] general protection fault in list_lru_add
On Fri, Mar 25, 2022 at 2:52 AM Muchun Song <songmuchun@...edance.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.
Linus
Powered by blists - more mailing lists