Qian Cai fcf88917dd slab: fix a crash by reading /proc/slab_allocators
The commit 510ded33e075 ("slab: implement slab_root_caches list")
changes the name of the list node within "struct kmem_cache" from "list"
to "root_caches_node", but leaks_show() still use the "list" which
causes a crash when reading /proc/slab_allocators.

You need to have CONFIG_SLAB=y and CONFIG_MEMCG=y to see the problem,
because without MEMCG all slab caches are root caches, and the "list"
node happens to be the right one.

Fixes: 510ded33e075 ("slab: implement slab_root_caches list")
Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Tobin C. Harding <tobin@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-04-07 19:23:12 -10:00
..
2019-03-12 10:04:00 -07:00
2018-12-28 12:11:46 -08:00
2018-10-31 08:54:16 -07:00
2019-03-05 21:07:18 -08:00
2018-06-07 17:34:36 -07:00
2019-04-05 16:02:31 -10:00
2018-11-18 10:15:09 -08:00
2018-02-06 18:32:48 -08:00