All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-sparse-more-check-on-mem_section-number.patch added to -mm tree
@ 2012-07-23 22:26 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-07-23 22:26 UTC (permalink / raw)
  To: mm-commits; +Cc: shangw, mhocko, rientjes


The patch titled
     Subject: mm/sparse: more checks on mem_section number
has been added to the -mm tree.  Its filename is
     mm-sparse-more-check-on-mem_section-number.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: mm/sparse: more checks on mem_section number

__section_nr() was implemented to retrieve the corresponding memory
section number according to its descriptor.  It's possible that the
specified memory section descriptor doesn't exist in the global array.  So
add more checking on that and report an error for a wrong case.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/sparse.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN mm/sparse.c~mm-sparse-more-check-on-mem_section-number mm/sparse.c
--- a/mm/sparse.c~mm-sparse-more-check-on-mem_section-number
+++ a/mm/sparse.c
@@ -130,6 +130,8 @@ int __section_nr(struct mem_section* ms)
 		     break;
 	}
 
+	VM_BUG_ON(root_nr == NR_SECTION_ROOTS);
+
 	return (root_nr * SECTIONS_PER_ROOT) + (ms - root);
 }
 
_
Subject: Subject: mm/sparse: more checks on mem_section number

Patches currently in -mm which might be from shangw@linux.vnet.ibm.com are

linux-next.patch
mm-slab-remove-duplicate-check.patch
mm-buddy-cleanup-on-should_fail_alloc_page.patch
mm-compaction-cleanup-on-compaction_deferred.patch
memcg-add-mem_cgroup_from_css-helper.patch
memcg-add-mem_cgroup_from_css-helper-fix.patch
memcg-add-mem_cgroup_from_css-helper-fix-2.patch
mm-sparse-optimize-sparse_index_alloc.patch
mm-sparse-more-check-on-mem_section-number.patch
mm-sparse-remove-index_init_lock.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-23 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-23 22:26 + mm-sparse-more-check-on-mem_section-number.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.