Re: [syzbot] [mm?] general protection fault in find_lock_task_mm
From: Hillf Danton
Date: Tue Dec 17 2024 - 05:33:55 EST
On Mon, 16 Dec 2024 11:16:28 -0800
> syzbot found the following issue on:
>
> HEAD commit: 231825b2e1ff Revert "unicode: Don't special case ignorable..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=102844f8580000
#syz test
--- x/mm/oom_kill.c
+++ y/mm/oom_kill.c
@@ -137,7 +137,10 @@ struct task_struct *find_lock_task_mm(st
rcu_read_lock();
for_each_thread(p, t) {
+ if (!tryget_task_struct(t))
+ continue;
task_lock(t);
+ put_task_struct(t);
if (likely(t->mm))
goto found;
task_unlock(t);
--