Skip to content
Snippets Groups Projects
  • Qian Cai's avatar
    7878c231
    slab: remove /proc/slab_allocators · 7878c231
    Qian Cai authored
    
    It turned out that DEBUG_SLAB_LEAK is still broken even after recent
    recue efforts that when there is a large number of objects like
    kmemleak_object which is normal on a debug kernel,
    
      # grep kmemleak /proc/slabinfo
      kmemleak_object   2243606 3436210 ...
    
    reading /proc/slab_allocators could easily loop forever while processing
    the kmemleak_object cache and any additional freeing or allocating
    objects will trigger a reprocessing. To make a situation worse,
    soft-lockups could easily happen in this sitatuion which will call
    printk() to allocate more kmemleak objects to guarantee an infinite
    loop.
    
    Also, since it seems no one had noticed when it was totally broken
    more than 2-year ago - see the commit fcf88917 ("slab: fix a crash
    by reading /proc/slab_allocators"), probably nobody cares about it
    anymore due to the decline of the SLAB. Just remove it entirely.
    
    Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarQian Cai <cai@lca.pw>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    7878c231
    History
    slab: remove /proc/slab_allocators
    Qian Cai authored
    
    It turned out that DEBUG_SLAB_LEAK is still broken even after recent
    recue efforts that when there is a large number of objects like
    kmemleak_object which is normal on a debug kernel,
    
      # grep kmemleak /proc/slabinfo
      kmemleak_object   2243606 3436210 ...
    
    reading /proc/slab_allocators could easily loop forever while processing
    the kmemleak_object cache and any additional freeing or allocating
    objects will trigger a reprocessing. To make a situation worse,
    soft-lockups could easily happen in this sitatuion which will call
    printk() to allocate more kmemleak objects to guarantee an infinite
    loop.
    
    Also, since it seems no one had noticed when it was totally broken
    more than 2-year ago - see the commit fcf88917 ("slab: fix a crash
    by reading /proc/slab_allocators"), probably nobody cares about it
    anymore due to the decline of the SLAB. Just remove it entirely.
    
    Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarQian Cai <cai@lca.pw>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.