Skip to content

Commit bdaa78c

Browse files
committed
Merge tag 'mm-hotfixes-stable-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc hotfixes from Andrew Morton: "15 hotfixes, 11 marked cc:stable. Only three or four of the latter address post-6.0 issues, which is hopefully a sign that things are converging" * tag 'mm-hotfixes-stable-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: revert "kbuild: fix -Wimplicit-function-declaration in license_is_gpl_compatible" Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled drm/amdgpu: temporarily disable broken Clang builds due to blown stack-frame mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths mm/khugepaged: fix GUP-fast interaction by sending IPI mm/khugepaged: take the right locks for page table retraction mm: migrate: fix THP's mapcount on isolation mm: introduce arch_has_hw_nonleaf_pmd_young() mm: add dummy pmd_young() for architectures not having it mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes() tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry() hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing madvise: use zap_page_range_single for madvise dontneed mm: replace VM_WARN_ON to pr_warn if the node is offline with __GFP_THISNODE
2 parents 6647e76 + 1d351f1 commit bdaa78c

File tree

23 files changed

+240
-66
lines changed

23 files changed

+240
-66
lines changed

arch/loongarch/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pmd)
490490
return pmd;
491491
}
492492

493+
#define pmd_young pmd_young
493494
static inline int pmd_young(pmd_t pmd)
494495
{
495496
return !!(pmd_val(pmd) & _PAGE_ACCESSED);

arch/mips/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pmd)
622622
return pmd;
623623
}
624624

625+
#define pmd_young pmd_young
625626
static inline int pmd_young(pmd_t pmd)
626627
{
627628
return !!(pmd_val(pmd) & _PAGE_ACCESSED);

arch/riscv/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ static inline int pmd_dirty(pmd_t pmd)
600600
return pte_dirty(pmd_pte(pmd));
601601
}
602602

603+
#define pmd_young pmd_young
603604
static inline int pmd_young(pmd_t pmd)
604605
{
605606
return pte_young(pmd_pte(pmd));

arch/s390/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ static inline int pmd_dirty(pmd_t pmd)
763763
return (pmd_val(pmd) & _SEGMENT_ENTRY_DIRTY) != 0;
764764
}
765765

766+
#define pmd_young pmd_young
766767
static inline int pmd_young(pmd_t pmd)
767768
{
768769
return (pmd_val(pmd) & _SEGMENT_ENTRY_YOUNG) != 0;

arch/sparc/include/asm/pgtable_64.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ static inline unsigned long pmd_dirty(pmd_t pmd)
693693
return pte_dirty(pte);
694694
}
695695

696+
#define pmd_young pmd_young
696697
static inline unsigned long pmd_young(pmd_t pmd)
697698
{
698699
pte_t pte = __pte(pmd_val(pmd));

arch/x86/include/asm/pgtable.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static inline int pmd_dirty(pmd_t pmd)
139139
return pmd_flags(pmd) & _PAGE_DIRTY;
140140
}
141141

142+
#define pmd_young pmd_young
142143
static inline int pmd_young(pmd_t pmd)
143144
{
144145
return pmd_flags(pmd) & _PAGE_ACCESSED;
@@ -1438,6 +1439,14 @@ static inline bool arch_has_hw_pte_young(void)
14381439
return true;
14391440
}
14401441

1442+
#ifdef CONFIG_XEN_PV
1443+
#define arch_has_hw_nonleaf_pmd_young arch_has_hw_nonleaf_pmd_young
1444+
static inline bool arch_has_hw_nonleaf_pmd_young(void)
1445+
{
1446+
return !cpu_feature_enabled(X86_FEATURE_XENPV);
1447+
}
1448+
#endif
1449+
14411450
#ifdef CONFIG_PAGE_TABLE_CHECK
14421451
static inline bool pte_user_accessible_page(pte_t pte)
14431452
{

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ menu "Display Engine Configuration"
55
config DRM_AMD_DC
66
bool "AMD DC - Enable new display engine"
77
default y
8+
depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
89
select SND_HDA_COMPONENT if SND_HDA_CORE
910
select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128)
1011
help
1112
Choose this option if you want to use the new display engine
1213
support for AMDGPU. This adds required support for Vega and
1314
Raven ASICs.
1415

16+
calculate_bandwidth() is presently broken on all !(X86_64 || SPARC64 || ARM64)
17+
architectures built with Clang (all released versions), whereby the stack
18+
frame gets blown up to well over 5k. This would cause an immediate kernel
19+
panic on most architectures. We'll revert this when the following bug report
20+
has been resolved: https://github.com/llvm/llvm-project/issues/41896.
21+
1522
config DRM_AMD_DC_DCN
1623
def_bool n
1724
help

fs/nilfs2/dat.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ static void nilfs_dat_commit_free(struct inode *dat,
111111
kunmap_atomic(kaddr);
112112

113113
nilfs_dat_commit_entry(dat, req);
114+
115+
if (unlikely(req->pr_desc_bh == NULL || req->pr_bitmap_bh == NULL)) {
116+
nilfs_error(dat->i_sb,
117+
"state inconsistency probably due to duplicate use of vblocknr = %llu",
118+
(unsigned long long)req->pr_entry_nr);
119+
return;
120+
}
114121
nilfs_palloc_commit_free_entry(dat, req);
115122
}
116123

include/asm-generic/tlb.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,16 @@ extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
222222
#define tlb_needs_table_invalidate() (true)
223223
#endif
224224

225+
void tlb_remove_table_sync_one(void);
226+
225227
#else
226228

227229
#ifdef tlb_needs_table_invalidate
228230
#error tlb_needs_table_invalidate() requires MMU_GATHER_RCU_TABLE_FREE
229231
#endif
230232

233+
static inline void tlb_remove_table_sync_one(void) { }
234+
231235
#endif /* CONFIG_MMU_GATHER_RCU_TABLE_FREE */
232236

233237

include/linux/gfp.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,20 @@ alloc_pages_bulk_array_node(gfp_t gfp, int nid, unsigned long nr_pages, struct p
210210
return __alloc_pages_bulk(gfp, nid, NULL, nr_pages, NULL, page_array);
211211
}
212212

213+
static inline void warn_if_node_offline(int this_node, gfp_t gfp_mask)
214+
{
215+
gfp_t warn_gfp = gfp_mask & (__GFP_THISNODE|__GFP_NOWARN);
216+
217+
if (warn_gfp != (__GFP_THISNODE|__GFP_NOWARN))
218+
return;
219+
220+
if (node_online(this_node))
221+
return;
222+
223+
pr_warn("%pGg allocation from offline node %d\n", &gfp_mask, this_node);
224+
dump_stack();
225+
}
226+
213227
/*
214228
* Allocate pages, preferring the node given as nid. The node must be valid and
215229
* online. For more general interface, see alloc_pages_node().
@@ -218,7 +232,7 @@ static inline struct page *
218232
__alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order)
219233
{
220234
VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES);
221-
VM_WARN_ON((gfp_mask & __GFP_THISNODE) && !node_online(nid));
235+
warn_if_node_offline(nid, gfp_mask);
222236

223237
return __alloc_pages(gfp_mask, order, nid, NULL);
224238
}
@@ -227,7 +241,7 @@ static inline
227241
struct folio *__folio_alloc_node(gfp_t gfp, unsigned int order, int nid)
228242
{
229243
VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES);
230-
VM_WARN_ON((gfp & __GFP_THISNODE) && !node_online(nid));
244+
warn_if_node_offline(nid, gfp);
231245

232246
return __folio_alloc(gfp, order, nid, NULL);
233247
}

0 commit comments

Comments
 (0)