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

Merge branch 'akpm' (patches from Andrew)

Merge fixes from Andrew Morton:
"6 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
drivers core: remove assert_held_device_hotplug()
mm: add private lock to serialize memory hotplug operations
mm: don't warn when vmalloc() fails due to a fatal signal
mm, x86: fix native_pud_clear build error
kasan: add a prototype of task_struct to avoid warning
z3fold: fix spinlock unlocking in page reclaim

+10 -16
-3
arch/x86/include/asm/pgtable-3level.h
··· 121 121 *(tmp + 1) = 0; 122 122 } 123 123 124 - #if !defined(CONFIG_SMP) || (defined(CONFIG_HIGHMEM64G) && \ 125 - defined(CONFIG_PARAVIRT)) 126 124 static inline void native_pud_clear(pud_t *pudp) 127 125 { 128 126 } 129 - #endif 130 127 131 128 static inline void pud_clear(pud_t *pudp) 132 129 {
+1 -1
arch/x86/include/asm/pgtable.h
··· 62 62 # define set_pud(pudp, pud) native_set_pud(pudp, pud) 63 63 #endif 64 64 65 - #ifndef __PAGETABLE_PMD_FOLDED 65 + #ifndef __PAGETABLE_PUD_FOLDED 66 66 #define pud_clear(pud) native_pud_clear(pud) 67 67 #endif 68 68
-5
drivers/base/core.c
··· 639 639 return restart_syscall(); 640 640 } 641 641 642 - void assert_held_device_hotplug(void) 643 - { 644 - lockdep_assert_held(&device_hotplug_lock); 645 - } 646 - 647 642 #ifdef CONFIG_BLOCK 648 643 static inline int device_is_not_partition(struct device *dev) 649 644 {
-1
include/linux/device.h
··· 1140 1140 extern void lock_device_hotplug(void); 1141 1141 extern void unlock_device_hotplug(void); 1142 1142 extern int lock_device_hotplug_sysfs(void); 1143 - void assert_held_device_hotplug(void); 1144 1143 extern int device_offline(struct device *dev); 1145 1144 extern int device_online(struct device *dev); 1146 1145 extern void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
+1
include/linux/kasan.h
··· 6 6 struct kmem_cache; 7 7 struct page; 8 8 struct vm_struct; 9 + struct task_struct; 9 10 10 11 #ifdef CONFIG_KASAN 11 12
-4
kernel/memremap.c
··· 247 247 align_start = res->start & ~(SECTION_SIZE - 1); 248 248 align_size = ALIGN(resource_size(res), SECTION_SIZE); 249 249 250 - lock_device_hotplug(); 251 250 mem_hotplug_begin(); 252 251 arch_remove_memory(align_start, align_size); 253 252 mem_hotplug_done(); 254 - unlock_device_hotplug(); 255 253 256 254 untrack_pfn(NULL, PHYS_PFN(align_start), align_size); 257 255 pgmap_radix_release(res); ··· 362 364 if (error) 363 365 goto err_pfn_remap; 364 366 365 - lock_device_hotplug(); 366 367 mem_hotplug_begin(); 367 368 error = arch_add_memory(nid, align_start, align_size, true); 368 369 mem_hotplug_done(); 369 - unlock_device_hotplug(); 370 370 if (error) 371 371 goto err_add_memory; 372 372
+5 -1
mm/memory_hotplug.c
··· 125 125 126 126 } 127 127 128 + /* Serializes write accesses to mem_hotplug.active_writer. */ 129 + static DEFINE_MUTEX(memory_add_remove_lock); 130 + 128 131 void mem_hotplug_begin(void) 129 132 { 130 - assert_held_device_hotplug(); 133 + mutex_lock(&memory_add_remove_lock); 131 134 132 135 mem_hotplug.active_writer = current; 133 136 ··· 150 147 mem_hotplug.active_writer = NULL; 151 148 mutex_unlock(&mem_hotplug.lock); 152 149 memhp_lock_release(); 150 + mutex_unlock(&memory_add_remove_lock); 153 151 } 154 152 155 153 /* add this memory to iomem resource */
+2 -1
mm/vmalloc.c
··· 1683 1683 1684 1684 if (fatal_signal_pending(current)) { 1685 1685 area->nr_pages = i; 1686 - goto fail; 1686 + goto fail_no_warn; 1687 1687 } 1688 1688 1689 1689 if (node == NUMA_NO_NODE) ··· 1709 1709 warn_alloc(gfp_mask, NULL, 1710 1710 "vmalloc: allocation failure, allocated %ld of %ld bytes", 1711 1711 (area->nr_pages*PAGE_SIZE), area->size); 1712 + fail_no_warn: 1712 1713 vfree(area->addr); 1713 1714 return NULL; 1714 1715 }
+1
mm/z3fold.c
··· 667 667 z3fold_page_unlock(zhdr); 668 668 spin_lock(&pool->lock); 669 669 if (kref_put(&zhdr->refcount, release_z3fold_page)) { 670 + spin_unlock(&pool->lock); 670 671 atomic64_dec(&pool->pages_nr); 671 672 return 0; 672 673 }