linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] WARNING in bdev_getblk
@ 2025-06-09  8:39 Xianying Wang
  2025-06-09 13:54 ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Xianying Wang @ 2025-06-09  8:39 UTC (permalink / raw)
  To: viro; +Cc: brauner, jack, linux-fsdevel, linux-kernel

Hi,

I encountered a kernel WARNING in the function bdev_getblk() when
fuzzing the Linux 6.12 kernel using Syzkaller. The crash occurs during
a block buffer allocation path, where __alloc_pages_noprof() fails
under memory pressure, and triggers a WARNING due to an internal
allocation failure.

Root Cause:

Code Path: The failure originates from the function bdev_getblk() in
fs/buffer.c, which attempts to allocate a new buffer via
grow_buffers() → grow_dev_folio() → __filemap_get_folio().
Memory Allocation Failure: Under specific memory pressure and
vm.zone_reclaim_mode settings, the internal call to alloc_pages() in
__alloc_pages_noprof() fails, resulting in the observed warning.

I recommend reviewing the block buffer allocation path in
bdev_getblk(), particularly how it handles allocation failures under
memory pressure.

This can be reproduced on:

HEAD commit:

commit adc218676eef25575469234709c2d87185ca223a

report: https://pastebin.com/raw/wqAeZJxF

console output : https://pastebin.com/raw/aLaVQpzR

kernel config : https://pastebin.com/x48ijkN8

C reproducer : https://pastebin.com/raw/whJgYnHk

Best regards,

Xianying

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-10  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09  8:39 [BUG] WARNING in bdev_getblk Xianying Wang
2025-06-09 13:54 ` Jan Kara
2025-06-09 20:48   ` Matthew Wilcox
2025-06-10  8:02     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).