From: Zhenhua Huang <quic_zhenhuah@quicinc.com>
To: Harry Yoo <harry.yoo@oracle.com>
Cc: <cl@linux.com>, <rientjes@google.com>, <vbabka@suse.cz>,
<roman.gushchin@linux.dev>, <surenb@google.com>,
<pasha.tatashin@soleen.com>, <akpm@linux-foundation.org>,
<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
<quic_tingweiz@quicinc.com>
Subject: Re: [PATCH] mm, slab: clean up slab->obj_exts always
Date: Mon, 21 Apr 2025 15:42:30 +0800 [thread overview]
Message-ID: <cedf31b0-e639-4062-bb65-c36d36da7e5c@quicinc.com> (raw)
In-Reply-To: <aAJtFwAH_ayIJ-SR@harry>
On 2025/4/18 23:17, Harry Yoo wrote:
> On Fri, Apr 18, 2025 at 02:14:59PM +0800, Zhenhua Huang wrote:
>> When memory allocation profiling is disabled at runtime or due to an
>> error, shutdown_mem_profiling() is called: slab->obj_exts which
>> previously allocated remains.
>> It won't be cleared by unaccount_slab() because of
>> mem_alloc_profiling_enabled() not true. It's incorrect, slab->obj_exts
>> should always be cleaned up in unaccount_slab() to avoid following error:
>>
>> [...]BUG: Bad page state in process...
>> ..
>> [...]page dumped because: page still charged to cgroup
>>
>> Fixes: 21c690a349baa ("mm: introduce slabobj_ext to support slab object extensions")
>> Signed-off-by: Zhenhua Huang<quic_zhenhuah@quicinc.com>
>> ---
> Acked-by: Harry Yoo<harry.yoo@oracle.com>
>
> I reproduced the issue locally and confirmed that this patch fixes
> the issue.
>
> Tested-by: Harry Yoo<harry.yoo@oracle.com>
>
> By the way, I think this should probably be backported to -stable?
Thanks Harry, I'll send another patch that incorporates Suren's
suggestion as well.
>
> -- Cheers, Harry / Hyeonggon
next prev parent reply other threads:[~2025-04-21 7:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 6:14 Zhenhua Huang
2025-04-18 15:17 ` Harry Yoo
2025-04-18 23:09 ` Suren Baghdasaryan
2025-04-21 7:45 ` Zhenhua Huang
2025-04-21 7:42 ` Zhenhua Huang [this message]
2025-04-20 2:46 ` David Rientjes
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=cedf31b0-e639-4062-bb65-c36d36da7e5c@quicinc.com \
--to=quic_zhenhuah@quicinc.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=harry.yoo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=quic_tingweiz@quicinc.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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
all inboxes | Powered by JetHome®