Skip to content

Commit d0cc67b

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "9 patches. Subsystems affected by this patch series: mm (kfence, mempolicy, memory-failure, pagemap, pagealloc, damon, and memory-failure), core-kernel, and MAINTAINERS" * emailed patches from Andrew Morton <[email protected]>: mm/hwpoison: clear MF_COUNT_INCREASED before retrying get_any_page() mm/damon/dbgfs: protect targets destructions with kdamond_lock mm/page_alloc: fix __alloc_size attribute for alloc_pages_exact_nid mm: delete unsafe BUG from page_cache_add_speculative() mm, hwpoison: fix condition in free hugetlb page path MAINTAINERS: mark more list instances as moderated kernel/crash_core: suppress unknown crashkernel parameter warning mm: mempolicy: fix THP allocations escaping mempolicy restrictions kfence: fix memory leak when cat kfence objects
2 parents b927dfc + 2a57d83 commit d0cc67b

File tree

8 files changed

+23
-15
lines changed

8 files changed

+23
-15
lines changed

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14845,7 +14845,7 @@ PCIE DRIVER FOR MEDIATEK
1484514845
M: Ryder Lee <[email protected]>
1484614846
M: Jianjun Wang <[email protected]>
1484714847
14848-
14848+
L: [email protected] (moderated for non-subscribers)
1484914849
S: Supported
1485014850
F: Documentation/devicetree/bindings/pci/mediatek*
1485114851
F: drivers/pci/controller/*mediatek*
@@ -17423,7 +17423,7 @@ F: drivers/video/fbdev/sm712*
1742317423
SILVACO I3C DUAL-ROLE MASTER
1742417424
M: Miquel Raynal <[email protected]>
1742517425
M: Conor Culhane <[email protected]>
17426-
17426+
L: [email protected] (moderated for non-subscribers)
1742717427
S: Maintained
1742817428
F: Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
1742917429
F: drivers/i3c/master/svc-i3c-master.c

include/linux/gfp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ extern unsigned long get_zeroed_page(gfp_t gfp_mask);
624624

625625
void *alloc_pages_exact(size_t size, gfp_t gfp_mask) __alloc_size(1);
626626
void free_pages_exact(void *virt, size_t size);
627-
__meminit void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) __alloc_size(1);
627+
__meminit void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) __alloc_size(2);
628628

629629
#define __get_free_page(gfp_mask) \
630630
__get_free_pages((gfp_mask), 0)

include/linux/pagemap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ static inline struct inode *folio_inode(struct folio *folio)
285285

286286
static inline bool page_cache_add_speculative(struct page *page, int count)
287287
{
288-
VM_BUG_ON_PAGE(PageTail(page), page);
289288
return folio_ref_try_add_rcu((struct folio *)page, count);
290289
}
291290

kernel/crash_core.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/buildid.h>
88
#include <linux/crash_core.h>
9+
#include <linux/init.h>
910
#include <linux/utsname.h>
1011
#include <linux/vmalloc.h>
1112

@@ -295,6 +296,16 @@ int __init parse_crashkernel_low(char *cmdline,
295296
"crashkernel=", suffix_tbl[SUFFIX_LOW]);
296297
}
297298

299+
/*
300+
* Add a dummy early_param handler to mark crashkernel= as a known command line
301+
* parameter and suppress incorrect warnings in init/main.c.
302+
*/
303+
static int __init parse_crashkernel_dummy(char *arg)
304+
{
305+
return 0;
306+
}
307+
early_param("crashkernel", parse_crashkernel_dummy);
308+
298309
Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type,
299310
void *data, size_t data_len)
300311
{

mm/damon/dbgfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,12 @@ static void dbgfs_before_terminate(struct damon_ctx *ctx)
650650
if (!targetid_is_pid(ctx))
651651
return;
652652

653+
mutex_lock(&ctx->kdamond_lock);
653654
damon_for_each_target_safe(t, next, ctx) {
654655
put_pid((struct pid *)t->id);
655656
damon_destroy_target(t);
656657
}
658+
mutex_unlock(&ctx->kdamond_lock);
657659
}
658660

659661
static struct damon_ctx *dbgfs_new_ctx(void)

mm/kfence/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ static const struct file_operations objects_fops = {
683683
.open = open_objects,
684684
.read = seq_read,
685685
.llseek = seq_lseek,
686+
.release = seq_release,
686687
};
687688

688689
static int __init kfence_debugfs_init(void)

mm/memory-failure.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,17 +1470,12 @@ static int memory_failure_hugetlb(unsigned long pfn, int flags)
14701470
if (!(flags & MF_COUNT_INCREASED)) {
14711471
res = get_hwpoison_page(p, flags);
14721472
if (!res) {
1473-
/*
1474-
* Check "filter hit" and "race with other subpage."
1475-
*/
14761473
lock_page(head);
1477-
if (PageHWPoison(head)) {
1478-
if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
1479-
|| (p != head && TestSetPageHWPoison(head))) {
1474+
if (hwpoison_filter(p)) {
1475+
if (TestClearPageHWPoison(head))
14801476
num_poisoned_pages_dec();
1481-
unlock_page(head);
1482-
return 0;
1483-
}
1477+
unlock_page(head);
1478+
return 0;
14841479
}
14851480
unlock_page(head);
14861481
res = MF_FAILED;
@@ -2239,6 +2234,7 @@ int soft_offline_page(unsigned long pfn, int flags)
22392234
} else if (ret == 0) {
22402235
if (soft_offline_free_page(page) && try_again) {
22412236
try_again = false;
2237+
flags &= ~MF_COUNT_INCREASED;
22422238
goto retry;
22432239
}
22442240
}

mm/mempolicy.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,8 +2140,7 @@ struct page *alloc_pages_vma(gfp_t gfp, int order, struct vm_area_struct *vma,
21402140
* memory with both reclaim and compact as well.
21412141
*/
21422142
if (!page && (gfp & __GFP_DIRECT_RECLAIM))
2143-
page = __alloc_pages_node(hpage_node,
2144-
gfp, order);
2143+
page = __alloc_pages(gfp, order, hpage_node, nmask);
21452144

21462145
goto out;
21472146
}

0 commit comments

Comments
 (0)