[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cedf31b0-e639-4062-bb65-c36d36da7e5c@quicinc.com>
Date: Mon, 21 Apr 2025 15:42:30 +0800
From: Zhenhua Huang <quic_zhenhuah@...cinc.com>
To: Harry Yoo <harry.yoo@...cle.com>
CC: <cl@...ux.com>, <rientjes@...gle.com>, <vbabka@...e.cz>,
<roman.gushchin@...ux.dev>, <surenb@...gle.com>,
<pasha.tatashin@...een.com>, <akpm@...ux-foundation.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<quic_tingweiz@...cinc.com>
Subject: Re: [PATCH] mm, slab: clean up slab->obj_exts always
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@...cinc.com>
>> ---
> Acked-by: Harry Yoo<harry.yoo@...cle.com>
>
> I reproduced the issue locally and confirmed that this patch fixes
> the issue.
>
> Tested-by: Harry Yoo<harry.yoo@...cle.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
Powered by blists - more mailing lists