diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-05-21 12:17:42 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-05-21 12:17:42 -0400 |
commit | d91134d499dcb27f10c325e1490df8a52f707316 (patch) | |
tree | f15d5062dede85cea7297a674dbf6d9102de7d34 /mm | |
parent | 1b5c78bddb7cd30df391c91122d8d77114d8da37 (diff) | |
parent | 52c6b95f8a2edaff98b779f15b2f4d69b61b18b9 (diff) |
Merge tag 'v3.2.18' into v3.2-rt
This is the 3.2.18 stable release
Diffstat (limited to 'mm')
-rw-r--r-- | mm/hugetlb.c | 1 | ||||
-rw-r--r-- | mm/nobootmem.c | 3 | ||||
-rw-r--r-- | mm/percpu.c | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bd936ede7329..7120c2e2cf82 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2405,7 +2405,6 @@ retry_avoidcopy: if (outside_reserve) { BUG_ON(huge_pte_none(pte)); if (unmap_ref_private(mm, vma, old_page, address)) { - BUG_ON(page_count(old_page) != 1); BUG_ON(huge_pte_none(pte)); spin_lock(&mm->page_table_lock); goto retry_avoidcopy; diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 7fa41b4a07bf..07c08c4db1d2 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -83,8 +83,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) static void __init __free_pages_memory(unsigned long start, unsigned long end) { - int i; - unsigned long start_aligned, end_aligned; + unsigned long i, start_aligned, end_aligned; int order = ilog2(BITS_PER_LONG); start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); diff --git a/mm/percpu.c b/mm/percpu.c index 716eb4acf2fc..5c297506d8f4 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1642,6 +1642,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, areas[group] = ptr; base = min(ptr, base); + } + + /* + * Copy data and free unused parts. This should happen after all + * allocations are complete; otherwise, we may end up with + * overlapping groups. + */ + for (group = 0; group < ai->nr_groups; group++) { + struct pcpu_group_info *gi = &ai->groups[group]; + void *ptr = areas[group]; for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { if (gi->cpu_map[i] == NR_CPUS) { |