Commit 086ee11b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "12 patches.

  Subsystems affected by this patch series: MAINTAINERS, mailmap, memfd,
  and mm (hugetlb, kasan, hugetlbfs, pagemap, selftests, memcg, and
  slab)"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  selftests/memfd: clean up mapping in mfd_fail_write
  mailmap: update Roman Gushchin's email
  MAINTAINERS, SLAB: add Roman as reviewer, git tree
  MAINTAINERS: add Shakeel as a memcg co-maintainer
  MAINTAINERS: remove Vladimir from memcg maintainers
  MAINTAINERS: add Roman as a memcg co-maintainer
  selftest/vm: fix map_fixed_noreplace test failure
  mm: fix use-after-free bug when mm->mmap is reused after being freed
  hugetlbfs: fix a truncation issue in hugepages parameter
  kasan: test: prevent cache merging in kmem_cache_double_destroy
  mm/hugetlb: fix kernel crash with hugetlb mremap
  MAINTAINERS: add sysctl-next git tree
parents 2c8c230e fda153c8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -333,6 +333,9 @@ Rémi Denis-Courmont <rdenis@simphalempin.com>
Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com>
Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org>
Ricardo Ribalda <ribalda@kernel.org> <ricardo.ribalda@gmail.com>
Roman Gushchin <roman.gushchin@linux.dev> <guro@fb.com>
Roman Gushchin <roman.gushchin@linux.dev> <guroan@gmail.com>
Roman Gushchin <roman.gushchin@linux.dev> <klamm@yandex-team.ru>
Ross Zwisler <zwisler@kernel.org> <ross.zwisler@linux.intel.com>
Rudolf Marek <R.Marek@sh.cvut.cz>
Rui Saraiva <rmps@joel.ist.utl.pt>
+5 −1
Original line number Diff line number Diff line
@@ -4913,7 +4913,8 @@ F: kernel/cgroup/cpuset.c
CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
M:	Johannes Weiner <hannes@cmpxchg.org>
M:	Michal Hocko <mhocko@kernel.org>
M:	Vladimir Davydov <vdavydov.dev@gmail.com>
M:	Roman Gushchin <roman.gushchin@linux.dev>
M:	Shakeel Butt <shakeelb@google.com>
L:	cgroups@vger.kernel.org
L:	linux-mm@kvack.org
S:	Maintained
@@ -15567,6 +15568,7 @@ M: Iurii Zaikin <yzaikin@google.com>
L:	linux-kernel@vger.kernel.org
L:	linux-fsdevel@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-next
F:	fs/proc/proc_sysctl.c
F:	include/linux/sysctl.h
F:	kernel/sysctl-test.c
@@ -17760,8 +17762,10 @@ M: David Rientjes <rientjes@google.com>
M:	Joonsoo Kim <iamjoonsoo.kim@lge.com>
M:	Andrew Morton <akpm@linux-foundation.org>
M:	Vlastimil Babka <vbabka@suse.cz>
R:	Roman Gushchin <roman.gushchin@linux.dev>
L:	linux-mm@kvack.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git
F:	include/linux/sl?b*.h
F:	mm/sl?b*
+4 −1
Original line number Diff line number Diff line
@@ -869,11 +869,14 @@ static void kmem_cache_invalid_free(struct kunit *test)
	kmem_cache_destroy(cache);
}

static void empty_cache_ctor(void *object) { }

static void kmem_cache_double_destroy(struct kunit *test)
{
	struct kmem_cache *cache;

	cache = kmem_cache_create("test_cache", 200, 0, 0, NULL);
	/* Provide a constructor to prevent cache merging. */
	cache = kmem_cache_create("test_cache", 200, 0, 0, empty_cache_ctor);
	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, cache);
	kmem_cache_destroy(cache);
	KUNIT_EXPECT_KASAN_FAIL(test, kmem_cache_destroy(cache));
+5 −6
Original line number Diff line number Diff line
@@ -4159,10 +4159,10 @@ static int __init hugepages_setup(char *s)
				pr_warn("HugeTLB: architecture can't support node specific alloc, ignoring!\n");
				return 0;
			}
			if (tmp >= nr_online_nodes)
				goto invalid;
			node = tmp;
			p += count + 1;
			if (node < 0 || node >= nr_online_nodes)
				goto invalid;
			/* Parse hugepages */
			if (sscanf(p, "%lu%n", &tmp, &count) != 1)
				goto invalid;
@@ -4851,14 +4851,13 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
}

static void move_huge_pte(struct vm_area_struct *vma, unsigned long old_addr,
			  unsigned long new_addr, pte_t *src_pte)
			  unsigned long new_addr, pte_t *src_pte, pte_t *dst_pte)
{
	struct hstate *h = hstate_vma(vma);
	struct mm_struct *mm = vma->vm_mm;
	pte_t *dst_pte, pte;
	spinlock_t *src_ptl, *dst_ptl;
	pte_t pte;

	dst_pte = huge_pte_offset(mm, new_addr, huge_page_size(h));
	dst_ptl = huge_pte_lock(h, mm, dst_pte);
	src_ptl = huge_pte_lockptr(h, mm, src_pte);

@@ -4917,7 +4916,7 @@ int move_hugetlb_page_tables(struct vm_area_struct *vma,
		if (!dst_pte)
			break;

		move_huge_pte(vma, old_addr, new_addr, src_pte);
		move_huge_pte(vma, old_addr, new_addr, src_pte, dst_pte);
	}
	flush_tlb_range(vma, old_end - len, old_end);
	mmu_notifier_invalidate_range_end(&range);
+1 −0
Original line number Diff line number Diff line
@@ -3186,6 +3186,7 @@ void exit_mmap(struct mm_struct *mm)
		vma = remove_vma(vma);
		cond_resched();
	}
	mm->mmap = NULL;
	mmap_write_unlock(mm);
	vm_unacct_memory(nr_accounted);
}
Loading