+ mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/mmap.c: remove a never-triggered warning in __vma_adjust()
has been added to the -mm tree.  Its filename is
     mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Subject: mm/mmap.c: remove a never-triggered warning in __vma_adjust()

The upper level of "if" makes sure (end >= next->vm_end), which means
there are only two possibilities:

   1) end == next->vm_end
   2) end > next->vm_end

remove_next is assigned to be (1 + end > next->vm_end).  This means if
remove_next is 1, end must equal to next->vm_end.

The VM_WARN_ON will never trigger.

Link: http://lkml.kernel.org/r/20190912063126.13250-1-richardw.yang@xxxxxxxxxxxxxxx
Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mmap.c |    2 --
 1 file changed, 2 deletions(-)

--- a/mm/mmap.c~mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust
+++ a/mm/mmap.c
@@ -769,8 +769,6 @@ int __vma_adjust(struct vm_area_struct *
 				remove_next = 1 + (end > next->vm_end);
 				VM_WARN_ON(remove_next == 2 &&
 					   end != next->vm_next->vm_end);
-				VM_WARN_ON(remove_next == 1 &&
-					   end != next->vm_end);
 				/* trim end to next, for case 6 first pass */
 				end = next->vm_end;
 			}
_

Patches currently in -mm which might be from richardw.yang@xxxxxxxxxxxxxxx are

mm-fix-typo-in-the-comment-when-calling-function-__setpageuptodate.patch
mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch
userfaultfd-use-vma_pagesize-for-all-huge-page-size-calculation.patch
userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch
userfaultfd-wrap-the-common-dst_vma-check-into-an-inlined-function.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux