The patch titled Subject: mm/slab: fix unaligned access on sparc64 has been added to the -mm tree. Its filename is mm-slab-fix-unaligned-access-on-sparc64.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-slab-fix-unaligned-access-on-sparc64.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab-fix-unaligned-access-on-sparc64.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: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Subject: mm/slab: fix unaligned access on sparc64 commit bf0dea23a9c0 ("mm/slab: use percpu allocator for cpu cache") changes allocation method for cpu cache array from slab allocator to percpu allocator. Alignment should be provided for aligned memory in percpu allocator case, but, that commit mistakenly set this alignment to 0. So, percpu allocator returns unaligned memory address. It doesn't cause any problem on x86 which permits unaligned access, but, it causes the problem on sparc64 which needs strong guarantee of alignment. Following bug report is reported from David Miller. I'm getting tons of the following on sparc64: [603965.383447] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603965.396987] Kernel unaligned access at TPC[546b60] free_block+0xa0/0x1a0 [603965.410523] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603965.424061] Kernel unaligned access at TPC[546b60] free_block+0xa0/0x1a0 [603965.437617] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603970.554394] log_unaligned: 333 callbacks suppressed [603970.564041] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603970.577576] Kernel unaligned access at TPC[546b60] free_block+0xa0/0x1a0 [603970.591122] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603970.604669] Kernel unaligned access at TPC[546b60] free_block+0xa0/0x1a0 [603970.618216] Kernel unaligned access at TPC[546b58] free_block+0x98/0x1a0 [603976.515633] log_unaligned: 31 callbacks suppressed snip... This patch provides proper alignment parameter when allocating cpu cache to fix this unaligned memory access problem on sparc64. Reported-by: David Miller <davem@xxxxxxxxxxxxx> Tested-by: David Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/slab.c~mm-slab-fix-unaligned-access-on-sparc64 mm/slab.c --- a/mm/slab.c~mm-slab-fix-unaligned-access-on-sparc64 +++ a/mm/slab.c @@ -1992,7 +1992,7 @@ static struct array_cache __percpu *allo struct array_cache __percpu *cpu_cache; size = sizeof(void *) * entries + sizeof(struct array_cache); - cpu_cache = __alloc_percpu(size, 0); + cpu_cache = __alloc_percpu(size, sizeof(void *)); if (!cpu_cache) return NULL; _ Patches currently in -mm which might be from iamjoonsoo.kim@xxxxxxx are origin.patch mm-slab-fix-unaligned-access-on-sparc64.patch drivers-dma-coherent-add-initialization-from-device-tree.patch drivers-dma-coherent-add-initialization-from-device-tree-fix.patch drivers-dma-coherent-add-initialization-from-device-tree-fix-fix.patch drivers-dma-coherent-add-initialization-from-device-tree-checkpatch-fixes.patch drivers-dma-contiguous-add-initialization-from-device-tree.patch page-owners-correct-page-order-when-to-free-page.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