All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+de1498ff3a934ac5e8b4@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [PATCH] Re: [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3)
Date: Tue, 22 Apr 2025 12:22:40 -0700	[thread overview]
Message-ID: <6807ec80.050a0220.36a438.0001.GAE@google.com> (raw)
In-Reply-To: <66fcb7f9.050a0220.f28ec.04e8.GAE@google.com>

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

***

Subject: [PATCH] Re: [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3)
Author: richard120310@gmail.com

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

Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
 fs/buffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/buffer.c b/fs/buffer.c
index cc8452f60251..e65a754176c1 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2883,6 +2883,8 @@ drop_buffers(struct folio *folio, struct buffer_head **buffers_to_free)
 	struct buffer_head *head = folio_buffers(folio);
 	struct buffer_head *bh;
 
+	if (!head)
+		goto out;
 	bh = head;
 	do {
 		if (buffer_busy(bh))
@@ -2897,6 +2899,7 @@ drop_buffers(struct folio *folio, struct buffer_head **buffers_to_free)
 			__remove_assoc_queue(bh);
 		bh = next;
 	} while (bh != head);
+out:
 	*buffers_to_free = head;
 	folio_detach_private(folio);
 	return true;
-- 
2.43.0


  parent reply	other threads:[~2025-04-22 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02  3:03 [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3) syzbot
2024-10-02 13:40 ` Jan Kara
2024-10-17 14:11 ` [syzbot] " syzbot
2025-04-18  9:46 ` [syzbot] Re: [syzbot] [jfs?] " syzbot
2025-04-22 19:22 ` syzbot [this message]
2025-04-23  2:37 ` [RFC PATCH] fs/buffer: Handle non folio buffer case for drop_buffer() I Hsin Cheng
2025-04-23 10:13   ` Jan Kara
2025-04-25 16:52     ` I Hsin Cheng
2025-04-25 20:01       ` Matthew Wilcox

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=6807ec80.050a0220.36a438.0001.GAE@google.com \
    --to=syzbot+de1498ff3a934ac5e8b4@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.