Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu

Pull percpu fixes from Tejun Heo:
"This pull request contains two patches. One is kmemleak annotation
fix which isn't critical. The other is kinda serious.

Depending on NUMA topology, percpu allocator may end up assigning
overlapping regions for the static percpu areas for different CPUs.
While critical, the bug has been there for a very long time and only
few configurations seem to be affected (NUMA configurations w/ no
memory nodes for example) - so, while it's critical, it isn't exactly
urgent."

* 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
kmemleak: Fix the kmemleak tracking of the percpu areas with !SMP
percpu: pcpu_embed_first_chunk() should free unused parts after all allocs are complete

+12
+12
mm/percpu.c
··· 1650 1650 areas[group] = ptr; 1651 1651 1652 1652 base = min(ptr, base); 1653 + } 1654 + 1655 + /* 1656 + * Copy data and free unused parts. This should happen after all 1657 + * allocations are complete; otherwise, we may end up with 1658 + * overlapping groups. 1659 + */ 1660 + for (group = 0; group < ai->nr_groups; group++) { 1661 + struct pcpu_group_info *gi = &ai->groups[group]; 1662 + void *ptr = areas[group]; 1653 1663 1654 1664 for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { 1655 1665 if (gi->cpu_map[i] == NR_CPUS) { ··· 1895 1885 fc = __alloc_bootmem(unit_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); 1896 1886 if (!ai || !fc) 1897 1887 panic("Failed to allocate memory for percpu areas."); 1888 + /* kmemleak tracks the percpu allocations separately */ 1889 + kmemleak_free(fc); 1898 1890 1899 1891 ai->dyn_size = unit_size; 1900 1892 ai->unit_size = unit_size;