The patch titled Subject: mm/madvise.c: use PAGE_ALIGN[ED] for range checking has been added to the -mm tree. Its filename is madvise-use-page_align-for-range-checking.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/madvise-use-page_align-for-range-checking.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/madvise-use-page_align-for-range-checking.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/madvise.c: use PAGE_ALIGN[ED] for range checking Improve readability, no functional change. Link: http://lkml.kernel.org/r/20191118032857.22683-1-richardw.yang@xxxxxxxxxxxxxxx Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/madvise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/madvise.c~madvise-use-page_align-for-range-checking +++ a/mm/madvise.c @@ -1059,9 +1059,9 @@ SYSCALL_DEFINE3(madvise, unsigned long, if (!madvise_behavior_valid(behavior)) return error; - if (start & ~PAGE_MASK) + if (!PAGE_ALIGNED(start)) return error; - len = (len_in + ~PAGE_MASK) & PAGE_MASK; + len = PAGE_ALIGN(len_in); /* Check to see whether len was rounded up from small -ve to zero */ if (len_in && !len) _ Patches currently in -mm which might be from richardw.yang@xxxxxxxxxxxxxxx are mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch mm-mmapc-prev-could-be-retrieved-from-vma-vm_prev.patch mm-mmapc-__vma_unlink_prev-is-not-necessary-now.patch mm-mmapc-extract-__vma_unlink_list-as-counter-part-for-__vma_link_list.patch mm-mmapc-rb_parent-is-not-necessary-in-__vma_link_list.patch mm-rmapc-dont-reuse-anon_vma-if-we-just-want-a-copy.patch mm-rmapc-reuse-mergeable-anon_vma-as-parent-when-fork.patch hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash.patch mm-mmapc-make-vma_merge-comment-more-easy-to-understand.patch madvise-use-page_align-for-range-checking.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 mm-fix-typo-in-the-comment-when-calling-function-__setpageuptodate.patch lib-rbtree-set-successors-parent-unconditionally.patch lib-rbtree-get-successors-color-directly.patch