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 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
"11 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
MAINTAINERS: add files related to kdump
z3fold: fix use-after-free when freeing handles
sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init()
MAINTAINERS: update email address for Naoya Horiguchi
sh: include linux/time_types.h for sockios
kasan: disable branch tracing for core runtime
selftests/vm/write_to_hugetlbfs.c: fix unused variable warning
selftests/vm/.gitignore: add mremap_dontunmap
rapidio: fix an error in get_user_pages_fast() error handling
x86: bitops: fix build regression
device-dax: don't leak kernel memory to user space after unloading kmem

+46 -28
+6 -1
MAINTAINERS
··· 7829 7829 F: drivers/media/platform/sti/hva 7830 7830 7831 7831 HWPOISON MEMORY FAILURE HANDLING 7832 - M: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> 7832 + M: Naoya Horiguchi <naoya.horiguchi@nec.com> 7833 7833 L: linux-mm@kvack.org 7834 7834 S: Maintained 7835 7835 F: mm/hwpoison-inject.c ··· 9185 9185 S: Maintained 9186 9186 W: http://lse.sourceforge.net/kdump/ 9187 9187 F: Documentation/admin-guide/kdump/ 9188 + F: fs/proc/vmcore.c 9189 + F: include/linux/crash_core.h 9190 + F: include/linux/crash_dump.h 9191 + F: include/uapi/linux/vmcore.h 9192 + F: kernel/crash_*.c 9188 9193 9189 9194 KEENE FM RADIO TRANSMITTER DRIVER 9190 9195 M: Hans Verkuil <hverkuil@xs4all.nl>
+2
arch/sh/include/uapi/asm/sockios.h
··· 2 2 #ifndef __ASM_SH_SOCKIOS_H 3 3 #define __ASM_SH_SOCKIOS_H 4 4 5 + #include <linux/time_types.h> 6 + 5 7 /* Socket-level I/O control calls. */ 6 8 #define FIOGETOWN _IOR('f', 123, int) 7 9 #define FIOSETOWN _IOW('f', 124, int)
+1 -1
arch/sparc/mm/srmmu.c
··· 333 333 pgd = pgd_offset_k(vaddr); 334 334 p4d = p4d_offset(__nocache_fix(pgd), vaddr); 335 335 pud = pud_offset(__nocache_fix(p4d), vaddr); 336 - pmd = pmd_offset(__nocache_fix(pgd), vaddr); 336 + pmd = pmd_offset(__nocache_fix(pud), vaddr); 337 337 pte = pte_offset_kernel(__nocache_fix(pmd), vaddr); 338 338 339 339 pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);
+6 -6
arch/x86/include/asm/bitops.h
··· 52 52 arch_set_bit(long nr, volatile unsigned long *addr) 53 53 { 54 54 if (__builtin_constant_p(nr)) { 55 - asm volatile(LOCK_PREFIX "orb %1,%0" 55 + asm volatile(LOCK_PREFIX "orb %b1,%0" 56 56 : CONST_MASK_ADDR(nr, addr) 57 - : "iq" (CONST_MASK(nr) & 0xff) 57 + : "iq" (CONST_MASK(nr)) 58 58 : "memory"); 59 59 } else { 60 60 asm volatile(LOCK_PREFIX __ASM_SIZE(bts) " %1,%0" ··· 72 72 arch_clear_bit(long nr, volatile unsigned long *addr) 73 73 { 74 74 if (__builtin_constant_p(nr)) { 75 - asm volatile(LOCK_PREFIX "andb %1,%0" 75 + asm volatile(LOCK_PREFIX "andb %b1,%0" 76 76 : CONST_MASK_ADDR(nr, addr) 77 - : "iq" (CONST_MASK(nr) ^ 0xff)); 77 + : "iq" (~CONST_MASK(nr))); 78 78 } else { 79 79 asm volatile(LOCK_PREFIX __ASM_SIZE(btr) " %1,%0" 80 80 : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); ··· 123 123 arch_change_bit(long nr, volatile unsigned long *addr) 124 124 { 125 125 if (__builtin_constant_p(nr)) { 126 - asm volatile(LOCK_PREFIX "xorb %1,%0" 126 + asm volatile(LOCK_PREFIX "xorb %b1,%0" 127 127 : CONST_MASK_ADDR(nr, addr) 128 - : "iq" ((u8)CONST_MASK(nr))); 128 + : "iq" (CONST_MASK(nr))); 129 129 } else { 130 130 asm volatile(LOCK_PREFIX __ASM_SIZE(btc) " %1,%0" 131 131 : : RLONG_ADDR(addr), "Ir" (nr) : "memory");
+11 -3
drivers/dax/kmem.c
··· 22 22 resource_size_t kmem_size; 23 23 resource_size_t kmem_end; 24 24 struct resource *new_res; 25 + const char *new_res_name; 25 26 int numa_node; 26 27 int rc; 27 28 ··· 49 48 kmem_size &= ~(memory_block_size_bytes() - 1); 50 49 kmem_end = kmem_start + kmem_size; 51 50 52 - /* Region is permanently reserved. Hot-remove not yet implemented. */ 53 - new_res = request_mem_region(kmem_start, kmem_size, dev_name(dev)); 51 + new_res_name = kstrdup(dev_name(dev), GFP_KERNEL); 52 + if (!new_res_name) 53 + return -ENOMEM; 54 + 55 + /* Region is permanently reserved if hotremove fails. */ 56 + new_res = request_mem_region(kmem_start, kmem_size, new_res_name); 54 57 if (!new_res) { 55 58 dev_warn(dev, "could not reserve region [%pa-%pa]\n", 56 59 &kmem_start, &kmem_end); 60 + kfree(new_res_name); 57 61 return -EBUSY; 58 62 } 59 63 ··· 69 63 * unknown to us that will break add_memory() below. 70 64 */ 71 65 new_res->flags = IORESOURCE_SYSTEM_RAM; 72 - new_res->name = dev_name(dev); 73 66 74 67 rc = add_memory(numa_node, new_res->start, resource_size(new_res)); 75 68 if (rc) { 76 69 release_resource(new_res); 77 70 kfree(new_res); 71 + kfree(new_res_name); 78 72 return rc; 79 73 } 80 74 dev_dax->dax_kmem_res = new_res; ··· 89 83 struct resource *res = dev_dax->dax_kmem_res; 90 84 resource_size_t kmem_start = res->start; 91 85 resource_size_t kmem_size = resource_size(res); 86 + const char *res_name = res->name; 92 87 int rc; 93 88 94 89 /* ··· 109 102 /* Release and free dax resources */ 110 103 release_resource(res); 111 104 kfree(res); 105 + kfree(res_name); 112 106 dev_dax->dax_kmem_res = NULL; 113 107 114 108 return 0;
+5
drivers/rapidio/devices/rio_mport_cdev.c
··· 877 877 rmcd_error("pinned %ld out of %ld pages", 878 878 pinned, nr_pages); 879 879 ret = -EFAULT; 880 + /* 881 + * Set nr_pages up to mean "how many pages to unpin, in 882 + * the error handler: 883 + */ 884 + nr_pages = pinned; 880 885 goto err_pg; 881 886 } 882 887
+8 -8
mm/kasan/Makefile
··· 15 15 16 16 # Function splitter causes unnecessary splits in __asan_load1/__asan_store1 17 17 # see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533 18 - CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 19 - CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 20 - CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 21 - CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 22 - CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 23 - CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 24 - CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 25 - CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) 18 + CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 19 + CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 20 + CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 21 + CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 22 + CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 23 + CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 24 + CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 25 + CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING 26 26 27 27 obj-$(CONFIG_KASAN) := common.o init.o report.o 28 28 obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
-1
mm/kasan/generic.c
··· 15 15 */ 16 16 17 17 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 - #define DISABLE_BRANCH_PROFILING 19 18 20 19 #include <linux/export.h> 21 20 #include <linux/interrupt.h>
-1
mm/kasan/tags.c
··· 12 12 */ 13 13 14 14 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 15 - #define DISABLE_BRANCH_PROFILING 16 15 17 16 #include <linux/export.h> 18 17 #include <linux/interrupt.h>
+6 -5
mm/z3fold.c
··· 318 318 slots = handle_to_slots(handle); 319 319 write_lock(&slots->lock); 320 320 *(unsigned long *)handle = 0; 321 - write_unlock(&slots->lock); 322 - if (zhdr->slots == slots) 321 + if (zhdr->slots == slots) { 322 + write_unlock(&slots->lock); 323 323 return; /* simple case, nothing else to do */ 324 + } 324 325 325 326 /* we are freeing a foreign handle if we are here */ 326 327 zhdr->foreign_handles--; 327 328 is_free = true; 328 - read_lock(&slots->lock); 329 329 if (!test_bit(HANDLES_ORPHANED, &slots->pool)) { 330 - read_unlock(&slots->lock); 330 + write_unlock(&slots->lock); 331 331 return; 332 332 } 333 333 for (i = 0; i <= BUDDY_MASK; i++) { ··· 336 336 break; 337 337 } 338 338 } 339 - read_unlock(&slots->lock); 339 + write_unlock(&slots->lock); 340 340 341 341 if (is_free) { 342 342 struct z3fold_pool *pool = slots_to_pool(slots); ··· 422 422 zhdr->start_middle = 0; 423 423 zhdr->cpu = -1; 424 424 zhdr->foreign_handles = 0; 425 + zhdr->mapped_count = 0; 425 426 zhdr->slots = slots; 426 427 zhdr->pool = pool; 427 428 INIT_LIST_HEAD(&zhdr->buddy);
+1
tools/testing/selftests/vm/.gitignore
··· 6 6 thuge-gen 7 7 compaction_test 8 8 mlock2-tests 9 + mremap_dontunmap 9 10 on-fault-limit 10 11 transhuge-stress 11 12 userfaultfd
-2
tools/testing/selftests/vm/write_to_hugetlbfs.c
··· 74 74 int write = 0; 75 75 int reserve = 1; 76 76 77 - unsigned long i; 78 - 79 77 if (signal(SIGINT, sig_handler) == SIG_ERR) 80 78 err(1, "\ncan't catch SIGINT\n"); 81 79