mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
Fixes: 7d2eba0557 ("mm: add tracepoint for scanning pages")
Reviewed-by: Ebru Akagunduz <[email protected]>
Acked-by: David Rientjes <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2b4015e9fb
commit
629d9d1caf
1 changed files with 1 additions and 1 deletions
|
|
@ -2320,7 +2320,7 @@ static void collapse_huge_page(struct mm_struct *mm,
|
|||
pgtable_t pgtable;
|
||||
struct page *new_page;
|
||||
spinlock_t *pmd_ptl, *pte_ptl;
|
||||
int isolated, result = 0;
|
||||
int isolated = 0, result = 0;
|
||||
unsigned long hstart, hend;
|
||||
struct mem_cgroup *memcg;
|
||||
unsigned long mmun_start; /* For mmu_notifiers */
|
||||
|
|
|
|||
Loading…
Reference in a new issue