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:
"5 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
include/asm-generic/topology.h: guard cpumask_of_node() macro argument
fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()
mm: remove VM_BUG_ON(PageSlab()) from page_mapcount()
mm,thp: stop leaking unreleased file pages
mm/z3fold: silence kmemleak false positives of slots

+19 -4
+1 -1
fs/binfmt_elf.c
··· 1733 1733 (!regset->active || regset->active(t->task, regset) > 0)) { 1734 1734 int ret; 1735 1735 size_t size = regset_size(t->task, regset); 1736 - void *data = kmalloc(size, GFP_KERNEL); 1736 + void *data = kzalloc(size, GFP_KERNEL); 1737 1737 if (unlikely(!data)) 1738 1738 return 0; 1739 1739 ret = regset->get(t->task, regset,
+1 -1
include/asm-generic/topology.h
··· 48 48 #ifdef CONFIG_NEED_MULTIPLE_NODES 49 49 #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) 50 50 #else 51 - #define cpumask_of_node(node) ((void)node, cpu_online_mask) 51 + #define cpumask_of_node(node) ((void)(node), cpu_online_mask) 52 52 #endif 53 53 #endif 54 54 #ifndef pcibus_to_node
+13 -2
include/linux/mm.h
··· 782 782 783 783 extern void kvfree(const void *addr); 784 784 785 + /* 786 + * Mapcount of compound page as a whole, does not include mapped sub-pages. 787 + * 788 + * Must be called only for compound pages or any their tail sub-pages. 789 + */ 785 790 static inline int compound_mapcount(struct page *page) 786 791 { 787 792 VM_BUG_ON_PAGE(!PageCompound(page), page); ··· 806 801 807 802 int __page_mapcount(struct page *page); 808 803 804 + /* 805 + * Mapcount of 0-order page; when compound sub-page, includes 806 + * compound_mapcount(). 807 + * 808 + * Result is undefined for pages which cannot be mapped into userspace. 809 + * For example SLAB or special types of pages. See function page_has_type(). 810 + * They use this place in struct page differently. 811 + */ 809 812 static inline int page_mapcount(struct page *page) 810 813 { 811 - VM_BUG_ON_PAGE(PageSlab(page), page); 812 - 813 814 if (unlikely(PageCompound(page))) 814 815 return __page_mapcount(page); 815 816 return atomic_read(&page->_mapcount) + 1;
+1
mm/khugepaged.c
··· 1692 1692 if (page_has_private(page) && 1693 1693 !try_to_release_page(page, GFP_KERNEL)) { 1694 1694 result = SCAN_PAGE_HAS_PRIVATE; 1695 + putback_lru_page(page); 1695 1696 goto out_unlock; 1696 1697 } 1697 1698
+3
mm/z3fold.c
··· 43 43 #include <linux/spinlock.h> 44 44 #include <linux/zpool.h> 45 45 #include <linux/magic.h> 46 + #include <linux/kmemleak.h> 46 47 47 48 /* 48 49 * NCHUNKS_ORDER determines the internal allocation granularity, effectively ··· 216 215 (gfp & ~(__GFP_HIGHMEM | __GFP_MOVABLE))); 217 216 218 217 if (slots) { 218 + /* It will be freed separately in free_handle(). */ 219 + kmemleak_not_leak(slots); 219 220 memset(slots->slot, 0, sizeof(slots->slot)); 220 221 slots->pool = (unsigned long)pool; 221 222 rwlock_init(&slots->lock);