The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Qing Wang <wangqing7171@gmail.com>
To: syzbot+cff8e1b82d7911dd051c@syzkaller.appspotmail.com
Cc: agruenba@redhat.com, gfs2@lists.linux.dev,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [gfs2?] general protection fault in gfs2_remove_from_journal (2)
Date: Fri, 13 Feb 2026 15:41:35 +0800	[thread overview]
Message-ID: <20260213074135.2389369-1-wangqing7171@gmail.com> (raw)
In-Reply-To: <6978bb60.050a0220.c9109.001c.GAE@google.com>

#syz test

diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index e4356198d8d8..8c3d0a83cb98 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -346,16 +346,16 @@ void gfs2_remove_from_journal(struct buffer_head *bh, int meta)
 	struct gfs2_trans *tr = current->journal_info;
 	int was_pinned = 0;
 
-	if (test_clear_buffer_pinned(bh)) {
-		trace_gfs2_pin(bd, 0);
-		atomic_dec(&sdp->sd_log_pinned);
-		list_del_init(&bd->bd_list);
-		if (meta == REMOVE_META)
-			tr->tr_num_buf_rm++;
-		else
-			tr->tr_num_databuf_rm++;
-		set_bit(TR_TOUCHED, &tr->tr_flags);
-		was_pinned = 1;
+	if (test_clear_buffer_pinned(bh) && bd) {
+			trace_gfs2_pin(bd, 0);
+			atomic_dec(&sdp->sd_log_pinned);
+			list_del_init(&bd->bd_list);
+			if (meta == REMOVE_META)
+				tr->tr_num_buf_rm++;
+			else
+				tr->tr_num_databuf_rm++;
+			set_bit(TR_TOUCHED, &tr->tr_flags);
+			was_pinned = 1;
 		brelse(bh);
 	}
 	if (bd) {

  reply	other threads:[~2026-02-13  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  1:45 [syzbot] [gfs2?] general protection fault in gfs2_remove_from_journal (2) syzbot
2026-01-27 13:19 ` syzbot
2026-02-13  7:41   ` Qing Wang [this message]
2026-02-13  7:58     ` syzbot
2026-02-13 10:00   ` Qing Wang
2026-02-13 10:18     ` syzbot
2026-02-13  9:21 ` Qing Wang
2026-02-13  9:38   ` syzbot

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=20260213074135.2389369-1-wangqing7171@gmail.com \
    --to=wangqing7171@gmail.com \
    --cc=agruenba@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+cff8e1b82d7911dd051c@syzkaller.appspotmail.com \
    --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