On Thu, Apr 24, 2025 at 06:48:46PM +0200, Vlastimil Babka wrote:
On 4/24/25 18:34, Andy Shevchenko wrote:
On Mon, Apr 21, 2025 at 03:52:32PM +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
Please, always compile test with `make W=1`. Since CONFIG_WERROR=y this effectively breaks the build with Clang.
I don't see why, nor observe any W=1 warnings, can you be more specific? Thanks.
Specifics are in the fix I sent. Just a relatively new Clang and relatively recent enabling of warning for unused static inline functions in the C code. If you are insisting in seeing the exact kernel configuration I have, tell me where to send, I'll send it privately to avoid noise here.