Re: [PATCH v2] kmemleak: add oom=<disable|ignore> runtime parameter

From: Catalin Marinas
Date: Mon Jul 24 2017 - 10:00:19 EST


On Mon, Jul 24, 2017 at 05:16:34PM +0800, shuwang@xxxxxxxxxx wrote:
> When running memory stress tests, kmemleak could be easily disabled in
> function create_object as system is out of memory and kmemleak failed to
> alloc from object_cache. Since there's no way to enable kmemleak after
> it's off, simply ignore the object_cache alloc failure will just loses
> track of some memory objects, but could increase the usability of kmemleak
> under memory stress.

I wonder how usable kmemleak is when not recording all the allocated
objects. If some of these memory blocks contain references to others,
such referenced objects could be reported as leaks (basically increasing
the false positives rate).

--
Catalin