Commit dc772f82 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of...

Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "14 hotfixes, 6 of which are cc:stable.

  All except the nilfs2 fix affect MM and all are singletons - see the
  chagelogs for details"

* tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
  mm: fix xyz_noprof functions calling profiled functions
  codetag: avoid race at alloc_slab_obj_exts
  mm/hugetlb: do not call vma_add_reservation upon ENOMEM
  mm/ksm: fix ksm_zero_pages accounting
  mm/ksm: fix ksm_pages_scanned accounting
  kmsan: do not wipe out origin when doing partial unpoisoning
  vmalloc: check CONFIG_EXECMEM in is_vmalloc_or_module_addr()
  mm: page_alloc: fix highatomic typing in multi-block buddies
  nilfs2: fix potential kernel bug due to lack of writeback flag waiting
  memcg: remove the lockdep assert from __mod_objcg_mlstate()
  mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
  mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
  mm: drop the 'anon_' prefix for swap-out mTHP counters
parents e60721bf 7373a51e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -467,11 +467,11 @@ anon_fault_fallback_charge
	instead falls back to using huge pages with lower orders or
	small pages even though the allocation was successful.

anon_swpout
swpout
	is incremented every time a huge page is swapped out in one
	piece without splitting.

anon_swpout_fallback
swpout_fallback
	is incremented if a huge page has to be split before swapout.
	Usually because failed to allocate some continuous swap space
	for the huge page.
+2 −2
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ void contpte_clear_young_dirty_ptes(struct vm_area_struct *vma,
	 * clearing access/dirty for the whole block.
	 */
	unsigned long start = addr;
	unsigned long end = start + nr;
	unsigned long end = start + nr * PAGE_SIZE;

	if (pte_cont(__ptep_get(ptep + nr - 1)))
		end = ALIGN(end, CONT_PTE_SIZE);
@@ -386,7 +386,7 @@ void contpte_clear_young_dirty_ptes(struct vm_area_struct *vma,
		ptep = contpte_align_down(ptep);
	}

	__clear_young_dirty_ptes(vma, start, ptep, end - start, flags);
	__clear_young_dirty_ptes(vma, start, ptep, (end - start) / PAGE_SIZE, flags);
}
EXPORT_SYMBOL_GPL(contpte_clear_young_dirty_ptes);

+1 −1
Original line number Diff line number Diff line
@@ -607,7 +607,7 @@ int nilfs_empty_dir(struct inode *inode)

		kaddr = nilfs_get_folio(inode, i, &folio);
		if (IS_ERR(kaddr))
			continue;
			return 0;

		de = (struct nilfs_dir_entry *)kaddr;
		kaddr += nilfs_last_byte(inode, i) - NILFS_DIR_REC_LEN(1);
+3 −0
Original line number Diff line number Diff line
@@ -1652,6 +1652,7 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
			if (bh->b_folio != bd_folio) {
				if (bd_folio) {
					folio_lock(bd_folio);
					folio_wait_writeback(bd_folio);
					folio_clear_dirty_for_io(bd_folio);
					folio_start_writeback(bd_folio);
					folio_unlock(bd_folio);
@@ -1665,6 +1666,7 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
			if (bh == segbuf->sb_super_root) {
				if (bh->b_folio != bd_folio) {
					folio_lock(bd_folio);
					folio_wait_writeback(bd_folio);
					folio_clear_dirty_for_io(bd_folio);
					folio_start_writeback(bd_folio);
					folio_unlock(bd_folio);
@@ -1681,6 +1683,7 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
	}
	if (bd_folio) {
		folio_lock(bd_folio);
		folio_wait_writeback(bd_folio);
		folio_clear_dirty_for_io(bd_folio);
		folio_start_writeback(bd_folio);
		folio_unlock(bd_folio);
+1 −1
Original line number Diff line number Diff line
@@ -3214,7 +3214,7 @@ static int proc_pid_ksm_stat(struct seq_file *m, struct pid_namespace *ns,
	mm = get_task_mm(task);
	if (mm) {
		seq_printf(m, "ksm_rmap_items %lu\n", mm->ksm_rmap_items);
		seq_printf(m, "ksm_zero_pages %lu\n", mm->ksm_zero_pages);
		seq_printf(m, "ksm_zero_pages %ld\n", mm_ksm_zero_pages(mm));
		seq_printf(m, "ksm_merging_pages %lu\n", mm->ksm_merging_pages);
		seq_printf(m, "ksm_process_profit %ld\n", ksm_process_profit(mm));
		mmput(mm);
Loading