The patch titled Subject: mm: thp: avoid uninitialized variable use has been removed from the -mm tree. Its filename was mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block-fix-2.patch This patch was dropped because it was folded into mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block.patch ------------------------------------------------------ From: Arnd Bergmann <arnd@xxxxxxxx> Subject: mm: thp: avoid uninitialized variable use When the down_read_trylock() fails, 'vma' has not been initialized yet, which gcc now warns about: mm/khugepaged.c: In function 'khugepaged': mm/khugepaged.c:1659:25: error: 'vma' may be used uninitialized in this function [-Werror=maybe-uninitialized] Presumably we are not supposed to call find_vma() without the mmap_sem either, so setting it to NULL for this case seems appropriate. Link: http://lkml.kernel.org/r/20171215125129.2948634-1-arnd@xxxxxxxx Fixes: 0951b59acf3a ("mm: thp: use down_read_trylock() in khugepaged to avoid long block") Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Cc: "Yang Shi" <yang.s@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/khugepaged.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN mm/khugepaged.c~mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block-fix-2 mm/khugepaged.c --- a/mm/khugepaged.c~mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block-fix-2 +++ a/mm/khugepaged.c @@ -1677,11 +1677,10 @@ static unsigned int khugepaged_scan_mm_s * Don't wait for semaphore (to avoid long wait times). Just move to * the next mm on the list. */ + vma = NULL; if (unlikely(!down_read_trylock(&mm->mmap_sem))) goto breakouterloop_mmap_sem; - if (unlikely(khugepaged_test_exit(mm))) - vma = NULL; - else + if (likely(!khugepaged_test_exit(mm))) vma = find_vma(mm, khugepaged_scan.address); progress++; _ Patches currently in -mm which might be from arnd@xxxxxxxx are mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html