Forwarded: [PATCH] btrfs: debug folio_alloc_buffers parameters

From: syzbot
Date: Fri Jan 09 2026 - 03:07:02 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: [PATCH] btrfs: debug folio_alloc_buffers parameters
Author: kartikey406@xxxxxxxxx

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

Debug patch to understand NULL pointer dereference in create_empty_buffers.
Print folio_size and blocksize to identify why folio_alloc_buffers returns NULL.

NOT FOR MERGE - debug only.

Signed-off-by: Deepanshu Kartikey <kartikey406@xxxxxxxxx>
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 838c0c571022..487a32faaa16 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -928,7 +928,7 @@ struct buffer_head *folio_alloc_buffers(struct folio *folio, unsigned long size,
/* The folio lock pins the memcg */
memcg = folio_memcg(folio);
old_memcg = set_active_memcg(memcg);
-
+ pr_err("DEBUG: folio_size=%lu blocksize=%lu\n",folio_size(folio), size);
head = NULL;
offset = folio_size(folio);
while ((offset -= size) >= 0) {
--
2.43.0