Re: [syzbot] [mm?] WARNING: bad unlock balance in do_wp_page

Qi Zheng
2026-04-27T10:58:52Z

On 4/27/26 6:44 PM, Andrew Morton wrote:
> On Mon, 27 Apr 2026 17:43:38 +0800 Qi Zheng <qi.zheng@linux.dev> wrote:
>
>>
>> Alright, it seems I have successfully reproduced it:
>> (The reproducer is attached at the bottom of this email.)
>
> That's a lot of code. Thanks for doing that. Maybe there's something
> here we can put into selftests/

If we are inclined to drop rebinding, then perhaps it's unnecessary to
add selftest for it. ;)

>
>>>>
>>>>> However, in a production environment, this is practically impossible.
>>>>
>>>> Can you expand on this?
>>>>
>>>> sysbot isn't a production environment ;)
>>>
>>> Rebinding only works when the hierarchy is completely empty. This is
>>> generally not the case in a production environment (e.g. when systemd
>>> is used).
>>>
>>> BTW, it seems rebinding is about to be deprecated:
>>>
>>> cgroup1_reconfigure
>>> --> pr_warn("option changes via remount are deprecated (pid=%d comm=%s)\n",
>>>             task_tgid_nr(current), current->comm);
>>>
>>> Also, it appears the current memcg subsystem assumes that
>>> cgroup_subsys_on_dfl(memory_cgrp_subsys) cannot be changed at runtime.
>>> (Please correct me if I missed anything.)
>>>
>>> If we can get a reproducer, we can try the following fix, or simply drop
>>> rebinding altogether?
>
> We'll want something which is applicable to 7.1-rcX please. Removal of
> rebinding sounds like something we'd address in 7.2 or later.

Got it.

>
>>> From 6ae41b91339625dd7bf0f819f775f26e78171a73 Mon Sep 17 00:00:00 2001
>>> From: Qi Zheng <zhengqi.arch@bytedance.com>
>>> Date: Mon, 27 Apr 2026 11:20:21 +0800
>>> Subject: [PATCH] mm: memcontrol: fix rcu unbalance in
>>>  get_non_dying_memcg_end()
>>>
>>> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
>>> ---
>>>  mm/memcontrol.c | 30 ++++++++++++++++++++----------
>>>  1 file changed, 20 insertions(+), 10 deletions(-)
>>
>> With the above patch applied, the warnings are gone.
>>
>> If no one objects, I'll submit the formal fix. Or should we actually
>> just remove rebinding instead?
>
> I suggest we just fix up current -rc please.

OK, will do.

Thanks,
Qi

>