Skip to content

Commit 8a91ebb

Browse files
committed
Merge tag 'mm-hotfixes-stable-2026-03-16-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "6 hotfixes. 4 are cc:stable. 3 are for MM. All are singletons - please see the changelogs for details" * tag 'mm-hotfixes-stable-2026-03-16-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: update email address for Ignat Korchagin mm/huge_memory: fix early failure try_to_migrate() when split huge pmd for shared THP mm/rmap: fix incorrect pte restoration for lazyfree folios mm/huge_memory: fix use of NULL folio in move_pages_huge_pmd() build_bug.h: correct function parameters names in kernel-doc crash_dump: don't log dm-crypt key bytes in read_key_from_user_keying
2 parents 2d1373e + 182b9b3 commit 8a91ebb

6 files changed

Lines changed: 29 additions & 12 deletions

File tree

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ Henrik Rydberg <[email protected]>
327327
Herbert Xu <[email protected]>
328328
329329
330+
330331
331332
332333

MAINTAINERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4022,7 +4022,7 @@ F: drivers/hwmon/asus_wmi_sensors.c
40224022
ASYMMETRIC KEYS
40234023
M: David Howells <[email protected]>
40244024
M: Lukas Wunner <[email protected]>
4025-
M: Ignat Korchagin <ignat@cloudflare.com>
4025+
M: Ignat Korchagin <ignat@linux.win>
40264026
40274027
40284028
S: Maintained
@@ -4035,7 +4035,7 @@ F: include/linux/verification.h
40354035

40364036
ASYMMETRIC KEYS - ECDSA
40374037
M: Lukas Wunner <[email protected]>
4038-
M: Ignat Korchagin <ignat@cloudflare.com>
4038+
M: Ignat Korchagin <ignat@linux.win>
40394039
R: Stefan Berger <[email protected]>
40404040
40414041
S: Maintained
@@ -4045,14 +4045,14 @@ F: include/crypto/ecc*
40454045

40464046
ASYMMETRIC KEYS - GOST
40474047
M: Lukas Wunner <[email protected]>
4048-
M: Ignat Korchagin <ignat@cloudflare.com>
4048+
M: Ignat Korchagin <ignat@linux.win>
40494049
40504050
S: Odd fixes
40514051
F: crypto/ecrdsa*
40524052

40534053
ASYMMETRIC KEYS - RSA
40544054
M: Lukas Wunner <[email protected]>
4055-
M: Ignat Korchagin <ignat@cloudflare.com>
4055+
M: Ignat Korchagin <ignat@linux.win>
40564056
40574057
S: Maintained
40584058
F: crypto/rsa*

include/linux/build_bug.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
/**
3333
* BUILD_BUG_ON_MSG - break compile if a condition is true & emit supplied
3434
* error message.
35-
* @condition: the condition which the compiler should know is false.
35+
* @cond: the condition which the compiler should know is false.
36+
* @msg: build-time error message
3637
*
3738
* See BUILD_BUG_ON for description.
3839
*/
@@ -60,6 +61,7 @@
6061

6162
/**
6263
* static_assert - check integer constant expression at build time
64+
* @expr: expression to be checked
6365
*
6466
* static_assert() is a wrapper for the C11 _Static_assert, with a
6567
* little macro magic to make the message optional (defaulting to the

kernel/crash_dump_dm_crypt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ static int read_key_from_user_keying(struct dm_crypt_key *dm_key)
168168

169169
memcpy(dm_key->data, ukp->data, ukp->datalen);
170170
dm_key->key_size = ukp->datalen;
171-
kexec_dprintk("Get dm crypt key (size=%u) %s: %8ph\n", dm_key->key_size,
172-
dm_key->key_desc, dm_key->data);
171+
kexec_dprintk("Get dm crypt key (size=%u) %s\n", dm_key->key_size,
172+
dm_key->key_desc);
173173

174174
out:
175175
up_read(&key->sem);

mm/huge_memory.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,8 @@ int move_pages_huge_pmd(struct mm_struct *mm, pmd_t *dst_pmd, pmd_t *src_pmd, pm
27972797
_dst_pmd = pmd_mkwrite(pmd_mkdirty(_dst_pmd), dst_vma);
27982798
} else {
27992799
src_pmdval = pmdp_huge_clear_flush(src_vma, src_addr, src_pmd);
2800-
_dst_pmd = folio_mk_pmd(src_folio, dst_vma->vm_page_prot);
2800+
_dst_pmd = move_soft_dirty_pmd(src_pmdval);
2801+
_dst_pmd = clear_uffd_wp_pmd(_dst_pmd);
28012802
}
28022803
set_pmd_at(mm, dst_addr, dst_pmd, _dst_pmd);
28032804

mm/rmap.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,14 @@ static inline unsigned int folio_unmap_pte_batch(struct folio *folio,
19551955
if (userfaultfd_wp(vma))
19561956
return 1;
19571957

1958-
return folio_pte_batch(folio, pvmw->pte, pte, max_nr);
1958+
/*
1959+
* If unmap fails, we need to restore the ptes. To avoid accidentally
1960+
* upgrading write permissions for ptes that were not originally
1961+
* writable, and to avoid losing the soft-dirty bit, use the
1962+
* appropriate FPB flags.
1963+
*/
1964+
return folio_pte_batch_flags(folio, vma, pvmw->pte, &pte, max_nr,
1965+
FPB_RESPECT_WRITE | FPB_RESPECT_SOFT_DIRTY);
19591966
}
19601967

19611968
/*
@@ -2443,11 +2450,17 @@ static bool try_to_migrate_one(struct folio *folio, struct vm_area_struct *vma,
24432450
__maybe_unused pmd_t pmdval;
24442451

24452452
if (flags & TTU_SPLIT_HUGE_PMD) {
2453+
/*
2454+
* split_huge_pmd_locked() might leave the
2455+
* folio mapped through PTEs. Retry the walk
2456+
* so we can detect this scenario and properly
2457+
* abort the walk.
2458+
*/
24462459
split_huge_pmd_locked(vma, pvmw.address,
24472460
pvmw.pmd, true);
2448-
ret = false;
2449-
page_vma_mapped_walk_done(&pvmw);
2450-
break;
2461+
flags &= ~TTU_SPLIT_HUGE_PMD;
2462+
page_vma_mapped_walk_restart(&pvmw);
2463+
continue;
24512464
}
24522465
#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION
24532466
pmdval = pmdp_get(pvmw.pmd);

0 commit comments

Comments
 (0)