[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250927001921.16747-1-kartikey406@gmail.com>
Date: Sat, 27 Sep 2025 05:49:21 +0530
From: Deepanshu Kartikey <kartikey406@...il.com>
To: adilger.kernel@...ger.ca,
tytso@....edu
Cc: linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: fix allocation failure in ext4_mb_load_buddy_gfp
Hi Andreas,
Thank you for the detailed analysis of the tradeoffs.
Looking at the syzbot report (https://syzkaller.appspot.com/bug?extid=fd3f70a4509fca8c265d),
this WARNING appears 4 times, so while not frequent, it's a real issue that occurs
under memory pressure conditions.
Your -EAGAIN suggestion makes sense. The approach would be:
1. During memory reclaim, use GFP_NOFS without __GFP_NOFAIL
2. If allocation fails, return -EAGAIN to let reclaim skip this inode
3. Preallocation cleanup happens later when memory is available
I understand this requires modifying the function signature and updating all call
sites. I'm willing to do this work and properly test each caller's error handling.
Questions on implementation:
- Should callers like ext4_clear_inode() ignore -EAGAIN (leave cleanup for later)?
- Should callers like ext4_truncate() retry or also defer?
- For the unused "int needed" parameter you mentioned - should I remove it in the
same patch or separately?
I'd like to implement this fix properly rather than leaving the WARNING unaddressed.
Could you provide guidance on the preferred error handling for the different caller
contexts?
Best regards,
Deepanshu
Powered by blists - more mailing lists