kmemleak: Scan objects allocated during a scanning episode
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 7 Jul 2009 09:32:58 +0000 (10:32 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 8 Jul 2009 13:25:13 +0000 (14:25 +0100)
commit2587362eaf5c9df4e08de11e6340e3c4a88ed4c8
tree90fc902a3c131146981164b859ed009d20157333
parentb87324d082d9d898e3c06b2a07a2b94b2430b8ba
kmemleak: Scan objects allocated during a scanning episode

Many of the false positives in kmemleak happen on busy systems where
objects are allocated during a kmemleak scanning episode. These objects
aren't scanned by default until the next memory scan. When such object
is added, for example, at the head of a list, it is possible that all
the other objects in the list become unreferenced until the next scan.

This patch adds checking for newly allocated objects at the end of the
scan and repeats the scanning on these objects. If Linux allocates
new objects at a higher rate than their scanning, it stops after a
predefined number of passes.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
mm/kmemleak.c