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 tag 'powerpc-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
"One fix going back to stable, for a bug on 32-bit introduced when we
added support for THREAD_INFO_IN_TASK.

A fix for a typo in a recent rework of our hugetlb code that leads to
crashes on 64-bit when using hugetlbfs with a 4K PAGE_SIZE.

Two fixes for our recent rework of the address layout on 64-bit hash
CPUs, both only triggered when userspace tries to access addresses
outside the user or kernel address ranges.

Finally a fix for a recently introduced double free in an error path
in our cacheinfo code.

Thanks to: Aneesh Kumar K.V, Christophe Leroy, Sachin Sant, Tobin C.
Harding"

* tag 'powerpc-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/cacheinfo: Remove double free
powerpc/mm/hash: Fix get_region_id() for invalid addresses
powerpc/mm: Drop VM_BUG_ON in get_region_id()
powerpc/mm: Fix crashes with hugepages & 4K pages
powerpc/32s: fix flush_hash_pages() on SMP

+7 -5
+4 -2
arch/powerpc/include/asm/book3s/64/hash.h
··· 93 93 #define VMALLOC_REGION_ID NON_LINEAR_REGION_ID(H_VMALLOC_START) 94 94 #define IO_REGION_ID NON_LINEAR_REGION_ID(H_KERN_IO_START) 95 95 #define VMEMMAP_REGION_ID NON_LINEAR_REGION_ID(H_VMEMMAP_START) 96 + #define INVALID_REGION_ID (VMEMMAP_REGION_ID + 1) 96 97 97 98 /* 98 99 * Defines the address of the vmemap area, in its own region on ··· 120 119 if (id == 0) 121 120 return USER_REGION_ID; 122 121 122 + if (id != (PAGE_OFFSET >> 60)) 123 + return INVALID_REGION_ID; 124 + 123 125 if (ea < H_KERN_VIRT_START) 124 126 return LINEAR_MAP_REGION_ID; 125 127 126 - VM_BUG_ON(id != 0xc); 127 128 BUILD_BUG_ON(NON_LINEAR_REGION_ID(H_VMALLOC_START) != 2); 128 129 129 130 region_id = NON_LINEAR_REGION_ID(ea); 130 - VM_BUG_ON(region_id > VMEMMAP_REGION_ID); 131 131 return region_id; 132 132 } 133 133
-1
arch/powerpc/kernel/cacheinfo.c
··· 767 767 cache_dir->kobj, "index%d", index); 768 768 if (rc) { 769 769 kobject_put(&index_dir->kobj); 770 - kfree(index_dir); 771 770 return; 772 771 } 773 772
+2 -1
arch/powerpc/mm/book3s32/hash_low.S
··· 539 539 #ifdef CONFIG_SMP 540 540 lis r9, (mmu_hash_lock - PAGE_OFFSET)@ha 541 541 addi r9, r9, (mmu_hash_lock - PAGE_OFFSET)@l 542 - lwz r8,TASK_CPU(r2) 542 + tophys (r8, r2) 543 + lwz r8, TASK_CPU(r8) 543 544 oris r8,r8,9 544 545 10: lwarx r0,0,r9 545 546 cmpi 0,r0,0
+1 -1
arch/powerpc/mm/hugetlbpage.c
··· 556 556 if (size <= PAGE_SIZE || !is_power_of_2(size)) 557 557 return -EINVAL; 558 558 559 - mmu_psize = check_and_get_huge_psize(size); 559 + mmu_psize = check_and_get_huge_psize(shift); 560 560 if (mmu_psize < 0) 561 561 return -EINVAL; 562 562