+ mm-sparse-check-__highest_present_section_nr-only-for-a-present-section.patch added to -mm tree

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

 



The patch titled
     Subject: mm/sparse.c: check __highest_present_section_nr only for a present section
has been added to the -mm tree.  Its filename is
     mm-sparse-check-__highest_present_section_nr-only-for-a-present-section.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-sparse-check-__highest_present_section_nr-only-for-a-present-section.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-sparse-check-__highest_present_section_nr-only-for-a-present-section.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 <richard.weiyang@xxxxxxxxx>
Subject: mm/sparse.c: check __highest_present_section_nr only for a present section

When searching a present section, there are two boundaries:

    * __highest_present_section_nr
    * NR_MEM_SECTIONS

And it is known, __highest_present_section_nr is a more strict boundary
than NR_MEM_SECTIONS.  This means it would be necessary to check
__highest_present_section_nr only.

Link: http://lkml.kernel.org/r/20180326081956.75275-2-richard.weiyang@xxxxxxxxx
Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/sparse.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -puN mm/sparse.c~mm-sparse-check-__highest_present_section_nr-only-for-a-present-section mm/sparse.c
--- a/mm/sparse.c~mm-sparse-check-__highest_present_section_nr-only-for-a-present-section
+++ a/mm/sparse.c
@@ -190,15 +190,13 @@ static inline int next_present_section_n
 		section_nr++;
 		if (present_section_nr(section_nr))
 			return section_nr;
-	} while ((section_nr < NR_MEM_SECTIONS) &&
-		 (section_nr <= __highest_present_section_nr));
+	} while ((section_nr <= __highest_present_section_nr));
 
 	return -1;
 }
 #define for_each_present_section_nr(start, section_nr)		\
 	for (section_nr = next_present_section_nr(start-1);	\
 	     ((section_nr >= 0) &&				\
-	      (section_nr < NR_MEM_SECTIONS) &&			\
 	      (section_nr <= __highest_present_section_nr));	\
 	     section_nr = next_present_section_nr(section_nr))
 
_

Patches currently in -mm which might be from richard.weiyang@xxxxxxxxx are

mm-page_alloc-remove-realsize-in-free_area_init_core.patch
mm-sparse-check-__highest_present_section_nr-only-for-a-present-section.patch
mm-sparse-pass-the-__highest_present_section_nr-1-to-alloc_func.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



[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