Commit 8e59a6a7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'mm-hotfixes-stable-2022-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull hotfixes from Andrew Morton:
 "Mainly MM fixes. About half for issues which were introduced after
  5.18 and the remainder for longer-term issues"

* tag 'mm-hotfixes-stable-2022-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm: split huge PUD on wp_huge_pud fallback
  nilfs2: fix incorrect masking of permission flags for symlinks
  mm/rmap: fix dereferencing invalid subpage pointer in try_to_migrate_one()
  riscv/mm: fix build error while PAGE_TABLE_CHECK enabled without MMU
  Documentation: highmem: use literal block for code example in highmem.h comment
  mm: sparsemem: fix missing higher order allocation splitting
  mm/damon: use set_huge_pte_at() to make huge pte old
  sh: convert nommu io{re,un}map() to static inline functions
  mm: userfaultfd: fix UFFDIO_CONTINUE on fallocated shmem pages
parents b5374396 14c99d65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ config RISCV
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
	select ARCH_SUPPORTS_HUGETLBFS if MMU
	select ARCH_SUPPORTS_PAGE_TABLE_CHECK
	select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
	select ARCH_USE_MEMTEST
	select ARCH_USE_QUEUED_RWLOCKS
	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
+6 −2
Original line number Diff line number Diff line
@@ -271,8 +271,12 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
#endif /* CONFIG_HAVE_IOREMAP_PROT */

#else /* CONFIG_MMU */
#define iounmap(addr)		do { } while (0)
#define ioremap(offset, size)	((void __iomem *)(unsigned long)(offset))
static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
{
	return (void __iomem *)(unsigned long)offset;
}

static inline void iounmap(volatile void __iomem *addr) { }
#endif /* CONFIG_MMU */

#define ioremap_uc	ioremap
+3 −0
Original line number Diff line number Diff line
@@ -198,6 +198,9 @@ static inline int nilfs_acl_chmod(struct inode *inode)

static inline int nilfs_init_acl(struct inode *inode, struct inode *dir)
{
	if (S_ISLNK(inode->i_mode))
		return 0;

	inode->i_mode &= ~current_umask();
	return 0;
}
+9 −9
Original line number Diff line number Diff line
@@ -149,18 +149,18 @@ static inline void *kmap_local_folio(struct folio *folio, size_t offset);
 * It is used in atomic context when code wants to access the contents of a
 * page that might be allocated from high memory (see __GFP_HIGHMEM), for
 * example a page in the pagecache.  The API has two functions, and they
 * can be used in a manner similar to the following:
 * can be used in a manner similar to the following::
 *
 * -- Find the page of interest. --
 *   // Find the page of interest.
 *   struct page *page = find_get_page(mapping, offset);
 *
 * -- Gain access to the contents of that page. --
 *   // Gain access to the contents of that page.
 *   void *vaddr = kmap_atomic(page);
 *
 * -- Do something to the contents of that page. --
 *   // Do something to the contents of that page.
 *   memset(vaddr, 0, PAGE_SIZE);
 *
 * -- Unmap that page. --
 *   // Unmap that page.
 *   kunmap_atomic(vaddr);
 *
 * Note that the kunmap_atomic() call takes the result of the kmap_atomic()
+1 −2
Original line number Diff line number Diff line
@@ -336,8 +336,7 @@ static void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,
	if (pte_young(entry)) {
		referenced = true;
		entry = pte_mkold(entry);
		huge_ptep_set_access_flags(vma, addr, pte, entry,
					   vma->vm_flags & VM_WRITE);
		set_huge_pte_at(mm, addr, pte, entry);
	}

#ifdef CONFIG_MMU_NOTIFIER
Loading