mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+b4a2af3000eaa84d95d5@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] btrfs: debug folio_alloc_buffers parameters
Date: Fri, 09 Jan 2026 00:06:56 -0800	[thread overview]
Message-ID: <6960b720.050a0220.1c677c.03b9.GAE@google.com> (raw)
In-Reply-To: <695faa63.050a0220.1c677c.039b.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH] btrfs: debug folio_alloc_buffers parameters
Author: kartikey406@gmail.com

#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@gmail.com>
---
 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


  parent reply	other threads:[~2026-01-09  8:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 13:00 [syzbot] [btrfs?] general protection fault in create_empty_buffers (5) syzbot
2026-01-09  4:30 ` Edward Adam Davis
2026-01-09  4:50   ` syzbot
2026-01-09  5:44 ` Forwarded: [PATCH] btrfs: validate block device block size before reading superblock syzbot
2026-01-09  8:06 ` syzbot [this message]
2026-01-09  8:43 ` Forwarded: [PATCH] btrfs: reject devices with block size larger than PAGE_SIZE syzbot
2026-01-09  9:09 ` Forwarded: [PATCH] btrfs: debug block device parameters before reading superblock syzbot
2026-01-09 10:49 ` [syzbot] [btrfs?] general protection fault in create_empty_buffers (5) Edward Adam Davis
2026-01-09 11:04   ` syzbot
2026-01-09 11:14 ` Edward Adam Davis
2026-01-09 11:36   ` syzbot
2026-01-09 11:37 ` [PATCH] btrfs: Sync read disk supper and set block size Edward Adam Davis
2026-01-09 12:43   ` Filipe Manana
2026-01-09 13:02     ` [PATCH v2] btrfs: Sync read disk super " Edward Adam Davis
2026-01-09 17:21       ` Filipe Manana
2026-01-09 21:04       ` Qu Wenruo
2026-01-09 12:56 ` [PATCH] " Edward Adam Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6960b720.050a0220.1c677c.03b9.GAE@google.com \
    --to=syzbot+b4a2af3000eaa84d95d5@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome