Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mm-hotfixes-stable-2026-04-19-00-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull MM fixes from Andrew Morton:
"7 hotfixes. 6 are cc:stable and all are for MM. Please see the
individual changelogs for details"

* tag 'mm-hotfixes-stable-2026-04-19-00-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
mm/damon/core: disallow non-power of two min_region_sz on damon_start()
mm/vmalloc: take vmap_purge_lock in shrinker
mm: call ->free_folio() directly in folio_unmap_invalidate()
mm: blk-cgroup: fix use-after-free in cgwb_release_workfn()
mm/zone_device: do not touch device folio after calling ->folio_free()
mm/damon/core: disallow time-quota setting zero esz
mm/mempolicy: fix weighted interleave auto sysfs name

+27 -12
+3 -2
mm/backing-dev.c
··· 618 618 wb_shutdown(wb); 619 619 620 620 css_put(wb->memcg_css); 621 - css_put(wb->blkcg_css); 622 - mutex_unlock(&wb->bdi->cgwb_release_mutex); 623 621 624 622 /* triggers blkg destruction if no online users left */ 625 623 blkcg_unpin_online(wb->blkcg_css); 624 + 625 + css_put(wb->blkcg_css); 626 + mutex_unlock(&wb->bdi->cgwb_release_mutex); 626 627 627 628 fprop_local_destroy_percpu(&wb->memcg_completions); 628 629
+10 -3
mm/damon/core.c
··· 1477 1477 int i; 1478 1478 int err = 0; 1479 1479 1480 + for (i = 0; i < nr_ctxs; i++) { 1481 + if (!is_power_of_2(ctxs[i]->min_region_sz)) 1482 + return -EINVAL; 1483 + } 1484 + 1480 1485 mutex_lock(&damon_lock); 1481 1486 if ((exclusive && nr_running_ctxs) || 1482 1487 (!exclusive && running_exclusive_ctxs)) { ··· 2389 2384 /* 2390 2385 * Called only if quota->ms, or quota->sz are set, or quota->goals is not empty 2391 2386 */ 2392 - static void damos_set_effective_quota(struct damos_quota *quota) 2387 + static void damos_set_effective_quota(struct damos_quota *quota, 2388 + struct damon_ctx *ctx) 2393 2389 { 2394 2390 unsigned long throughput; 2395 2391 unsigned long esz = ULONG_MAX; ··· 2415 2409 else 2416 2410 throughput = PAGE_SIZE * 1024; 2417 2411 esz = min(throughput * quota->ms, esz); 2412 + esz = max(ctx->min_region_sz, esz); 2418 2413 } 2419 2414 2420 2415 if (quota->sz && quota->sz < esz) ··· 2452 2445 /* First charge window */ 2453 2446 if (!quota->total_charged_sz && !quota->charged_from) { 2454 2447 quota->charged_from = jiffies; 2455 - damos_set_effective_quota(quota); 2448 + damos_set_effective_quota(quota, c); 2456 2449 } 2457 2450 2458 2451 /* New charge window starts */ ··· 2467 2460 quota->charged_sz = 0; 2468 2461 if (trace_damos_esz_enabled()) 2469 2462 cached_esz = quota->esz; 2470 - damos_set_effective_quota(quota); 2463 + damos_set_effective_quota(quota, c); 2471 2464 if (trace_damos_esz_enabled() && quota->esz != cached_esz) 2472 2465 damos_trace_esz(c, s, quota); 2473 2466 }
+2 -1
mm/filemap.c
··· 228 228 page_cache_delete(mapping, folio, shadow); 229 229 } 230 230 231 - void filemap_free_folio(struct address_space *mapping, struct folio *folio) 231 + static void filemap_free_folio(const struct address_space *mapping, 232 + struct folio *folio) 232 233 { 233 234 void (*free_folio)(struct folio *); 234 235
-1
mm/internal.h
··· 557 557 pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices); 558 558 unsigned find_get_entries(struct address_space *mapping, pgoff_t *start, 559 559 pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices); 560 - void filemap_free_folio(struct address_space *mapping, struct folio *folio); 561 560 int truncate_inode_folio(struct address_space *mapping, struct folio *folio); 562 561 bool truncate_inode_partial_folio(struct folio *folio, loff_t start, 563 562 loff_t end);
+5 -3
mm/mempolicy.c
··· 3788 3788 } 3789 3789 } 3790 3790 3791 - static struct kobj_attribute wi_auto_attr = 3792 - __ATTR(auto, 0664, weighted_interleave_auto_show, 3793 - weighted_interleave_auto_store); 3791 + static struct kobj_attribute wi_auto_attr = { 3792 + .attr = { .name = "auto", .mode = 0664 }, 3793 + .show = weighted_interleave_auto_show, 3794 + .store = weighted_interleave_auto_store, 3795 + }; 3794 3796 3795 3797 static void wi_cleanup(void) { 3796 3798 sysfs_remove_file(&wi_group->wi_kobj, &wi_auto_attr.attr);
+1 -1
mm/memremap.c
··· 454 454 if (WARN_ON_ONCE(!pgmap->ops || !pgmap->ops->folio_free)) 455 455 break; 456 456 pgmap->ops->folio_free(folio); 457 - percpu_ref_put_many(&folio->pgmap->ref, nr); 457 + percpu_ref_put_many(&pgmap->ref, nr); 458 458 break; 459 459 460 460 case MEMORY_DEVICE_GENERIC:
+5 -1
mm/truncate.c
··· 622 622 int folio_unmap_invalidate(struct address_space *mapping, struct folio *folio, 623 623 gfp_t gfp) 624 624 { 625 + void (*free_folio)(struct folio *); 625 626 int ret; 626 627 627 628 VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio); ··· 649 648 xa_unlock_irq(&mapping->i_pages); 650 649 if (mapping_shrinkable(mapping)) 651 650 inode_lru_list_add(mapping->host); 651 + free_folio = mapping->a_ops->free_folio; 652 652 spin_unlock(&mapping->host->i_lock); 653 653 654 - filemap_free_folio(mapping, folio); 654 + if (free_folio) 655 + free_folio(folio); 656 + folio_put_refs(folio, folio_nr_pages(folio)); 655 657 return 1; 656 658 failed: 657 659 xa_unlock_irq(&mapping->i_pages);
+1
mm/vmalloc.c
··· 5416 5416 { 5417 5417 struct vmap_node *vn; 5418 5418 5419 + guard(mutex)(&vmap_purge_lock); 5419 5420 for_each_vmap_node(vn) 5420 5421 decay_va_pool_node(vn, true); 5421 5422