]> git.baikalelectronics.ru Git - kernel.git/commit
kmemleak: record accurate early log buffer count and report when exceeded
authorWang Kai <morgan.wang@huawei.com>
Tue, 8 Sep 2015 22:03:41 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Sep 2015 22:35:28 +0000 (15:35 -0700)
commit23f82b179bdc36fcdb19db29bad56b66c990ccfd
tree83e3cd390ae01824f4d7aff599cfd292927e2549
parent78b95b962c60e8973a5c50d7c14f7d4568375f3c
kmemleak: record accurate early log buffer count and report when exceeded

In log_early function, crt_early_log should also count once when
'crt_early_log >= ARRAY_SIZE(early_log)'.  Otherwise the reported count
from kmemleak_init is one less than 'actual number'.

Then, in kmemleak_init, if early_log buffer size equal actual number,
kmemleak will init sucessful, so change warning condition to
'crt_early_log > ARRAY_SIZE(early_log)'.

Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/kmemleak.c