[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJuCfpEbEd57-8Lrn9_jSK0p=KN7p0PwsuhhjxJViqcN+v+0bw@mail.gmail.com>
Date: Thu, 12 Dec 2024 20:22:34 -0800
From: Suren Baghdasaryan <surenb@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Wang <00107082@....com>, kent.overstreet@...ux.dev,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, lkp@...el.com,
oe-lkp@...ts.linux.dev, oliver.sang@...el.com, yuzhao@...gle.com
Subject: Re: [PATCH v3] mm/codetag: clear tags before swap
On Thu, Dec 12, 2024 at 8:12 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Fri, 13 Dec 2024 09:33:32 +0800 David Wang <00107082@....com> wrote:
>
> > When CONFIG_MEM_ALLOC_PROFILING_DEBUG is set, kernel WARN would be
> > triggered when calling __alloc_tag_ref_set() during swap:
> >
> > alloc_tag was not cleared (got tag for mm/filemap.c:1951)
> > WARNING: CPU: 0 PID: 816 at ./include/linux/alloc_tag.h...
> >
> > Clear code tags before swap can fix the warning. And this patch also fix
> > a potential invalid address dereference in alloc_tag_add_check() when
> > CONFIG_MEM_ALLOC_PROFILING_DEBUG is set and ref->ct is CODETAG_EMPTY,
> > which is defined as ((void *)1).
> >
> > Signed-off-by: David Wang <00107082@....com>
> > Reported-by: kernel test robot <oliver.sang@...el.com>
> > Closes: https://lore.kernel.org/oe-lkp/202412112227.df61ebb-lkp@intel.com
>
> This points at
>
> 51f43d5d82ed ("mm/codetag: swap tags when migrate pages"), which had
> Fixes: e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()")
>
> e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()") had
> Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging")
> Cc: <stable@...r.kernel.org>
>
> And I'm thinking that this fix should have
> Fixes: 51f43d5d82ed ("mm/codetag: swap tags when migrate pages")
> Cc: <stable@...r.kernel.org>
Yes, that is correct. Sorry for missing that.
>
Powered by blists - more mailing lists