Re: [RESEND PATCH] slab: skip kmemleak_object in leaks_show()

From: David Rientjes
Date: Mon May 20 2019 - 13:20:34 EST


On Tue, 14 May 2019, Qian Cai wrote:

> Running tests on a debug kernel will usually generate a large number of
> kmemleak objects.
>
> # grep kmemleak /proc/slabinfo
> kmemleak_object 2243606 3436210 ...
>
> As the result, 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 a livelock.
>
> Since kmemleak_object has a single call site (create_object()), there
> isn't much new information compared with slabinfo. Just skip it.
>
> Signed-off-by: Qian Cai <cai@xxxxxx>

I assume this is now obsolete since commit 7878c231dae0 ("slab: remove
/proc/slab_allocators").