Re: Potential Linux Crash: WARNING in ext4_dirty_folio in Linux kernel v6.13-rc5

From: Matt Fleming
Date: Wed Mar 26 2025 - 06:59:40 EST


On Thu, Mar 06, 2025 at 05:13:51 +0000, Matthew wrote:
> This is the exact same problem I just analysed for you. Except this
> time it's ext4 rather than FAT.
>
> https://lore.kernel.org/linux-mm/Z8kuWyqj8cS-stKA@xxxxxxxxxxxxxxxxxxxx/
> for the benefit of the ext4 people who're just finding out about this.

Hi there,

I'm also seeing this PF_MEMALLOC WARN triggered from kswapd in 6.12.19.

Does overlayfs need some kind of background inode reclaim support?

Call Trace:
<TASK>
__alloc_pages_noprof+0x31c/0x330
alloc_pages_mpol_noprof+0xe3/0x1d0
folio_alloc_noprof+0x5b/0xa0
__filemap_get_folio+0x1f3/0x380
__getblk_slow+0xa3/0x1e0
__ext4_get_inode_loc+0x121/0x4b0
ext4_get_inode_loc+0x40/0xa0
ext4_reserve_inode_write+0x39/0xc0
__ext4_mark_inode_dirty+0x5b/0x220
ext4_evict_inode+0x26d/0x690
evict+0x112/0x2a0
__dentry_kill+0x71/0x180
dput+0xeb/0x1b0
ovl_stack_put+0x2e/0x50 [overlay]
ovl_destroy_inode+0x3a/0x60 [overlay]
destroy_inode+0x3b/0x70
__dentry_kill+0x71/0x180
shrink_dentry_list+0x6b/0xe0
prune_dcache_sb+0x56/0x80
super_cache_scan+0x12c/0x1e0
do_shrink_slab+0x13b/0x350
shrink_slab+0x278/0x3a0
shrink_node+0x328/0x880
balance_pgdat+0x36d/0x740
kswapd+0x1f0/0x380
kthread+0xd2/0x100
ret_from_fork+0x34/0x50
ret_from_fork_asm+0x1a/0x30
</TASK>

Thanks,
Matt