From: Suren Baghdasaryan <surenb@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Wang <00107082@163.com>,
kent.overstreet@linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, lkp@intel.com, oe-lkp@lists.linux.dev,
oliver.sang@intel.com, yuzhao@google.com
Subject: Re: [PATCH v3] mm/codetag: clear tags before swap
Date: Thu, 12 Dec 2024 20:22:34 -0800 [thread overview]
Message-ID: <CAJuCfpEbEd57-8Lrn9_jSK0p=KN7p0PwsuhhjxJViqcN+v+0bw@mail.gmail.com> (raw)
In-Reply-To: <20241212201212.c61bfebbbdb51b3c8bfeed11@linux-foundation.org>
On Thu, Dec 12, 2024 at 8:12 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 13 Dec 2024 09:33:32 +0800 David Wang <00107082@163.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@163.com>
> > Reported-by: kernel test robot <oliver.sang@intel.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@vger.kernel.org>
>
> And I'm thinking that this fix should have
> Fixes: 51f43d5d82ed ("mm/codetag: swap tags when migrate pages")
> Cc: <stable@vger.kernel.org>
Yes, that is correct. Sorry for missing that.
>
prev parent reply other threads:[~2024-12-13 4:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 15:08 [linus:master] [mm/codetag] 51f43d5d82: WARNING:at_include/linux/alloc_tag.h:#__alloc_tag_ref_set kernel test robot
2024-12-12 2:12 ` David Wang
2024-12-12 4:01 ` [PATCH] mm/codetag: clear tags before swap David Wang
2024-12-12 7:09 ` Suren Baghdasaryan
2024-12-12 8:17 ` David Wang
2024-12-12 8:29 ` [PATCH v2] " David Wang
2024-12-12 23:18 ` Suren Baghdasaryan
2024-12-13 1:33 ` [PATCH v3] " David Wang
2024-12-13 4:12 ` Andrew Morton
2024-12-13 4:22 ` Suren Baghdasaryan [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='CAJuCfpEbEd57-8Lrn9_jSK0p=KN7p0PwsuhhjxJViqcN+v+0bw@mail.gmail.com' \
--to=surenb@google.com \
--cc=00107082@163.com \
--cc=akpm@linux-foundation.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=yuzhao@google.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