]> git.baikalelectronics.ru Git - kernel.git/commit
mm: avoid uninitialized variable in tracepoint
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 Jan 2016 20:50:26 +0000 (21:50 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Jan 2016 17:21:41 +0000 (09:21 -0800)
commit8574012f9d30917f09753b78c67ad380062b1e54
treee0d107e5041480d2097e8b02cad4f1ba563ddf58
parent6d23b7a8bb6ab46ba4844aca53bb21bef6aa450e
mm: avoid uninitialized variable in tracepoint

A newly added tracepoint in the hugepage code uses a variable in the
error handling that is not initialized at that point:

include/trace/events/huge_memory.h:81:230: error: 'isolated' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The result is relatively harmless, as the trace data will in rare
cases contain incorrect data.

This works around the problem by adding an explicit initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fb762390fa58 ("mm: add tracepoint for scanning pages")
Reviewed-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c