• Shakeel Butt's avatar
    mm/list_lru.c: fix memory leak in __memcg_init_list_lru_node · 1bf23a04
    Shakeel Butt authored
    commit 3510955b upstream.
    
    Syzbot reported following memory leak:
    
    ffffffffda RBX: 0000000000000003 RCX: 0000000000441f79
    BUG: memory leak
    unreferenced object 0xffff888114f26040 (size 32):
      comm "syz-executor626", pid 7056, jiffies 4294948701 (age 39.410s)
      hex dump (first 32 bytes):
        40 60 f2 14 81 88 ff ff 40 60 f2 14 81 88 ff ff  @`......@`......
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
         slab_post_alloc_hook mm/slab.h:439 [inline]
         slab_alloc mm/slab.c:3326 [inline]
         kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553
         kmalloc include/linux/slab.h:547 [inline]
         __memcg_init_list_lru_node+0x58/0xf0 mm/list_lru.c:352
         memcg_init_list_lru_node mm/list_lru.c:375 [inline]
         memcg_init_list_lru mm/list_lru.c:459 [inline]
         __list_lru_init+0x193/0x2a0 mm/list_lru.c:626
         alloc_super+0x2e0/0x310 fs/super.c:269
         sget_userns+0x94/0x2a0 fs/s...
    1bf23a04
list_lru.c 12.5 KB