Re: [syzbot] [mm?] BUG: unable to handle kernel paging request in list_lru_add

From: Hillf Danton
Date: Sat Jul 13 2024 - 05:08:11 EST


On Fri, 12 Jul 2024 10:11:25 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 43db1e03c086 Merge tag 'for-6.10/dm-fixes-2' of git://git...
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12b1da7e980000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 43db1e03c086

--- x/mm/list_lru.c
+++ y/mm/list_lru.c
@@ -55,7 +55,8 @@ list_lru_from_memcg_idx(struct list_lru
if (list_lru_memcg_aware(lru) && idx >= 0) {
struct list_lru_memcg *mlru = xa_load(&lru->xa, idx);

- return mlru ? &mlru->node[nid] : NULL;
+ if (mlru)
+ return &mlru->node[nid];
}
return &lru->node[nid].lru;
}
--