Forwarded: Re: [syzbot] [gfs2?] KASAN: null-ptr-deref Write in gfs2_trans_add_revoke

From: syzbot
Date: Thu Jul 31 2025 - 23:48:53 EST


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

***

Subject: Re: [syzbot] [gfs2?] KASAN: null-ptr-deref Write in gfs2_trans_add_revoke
Author: lizhi.xu@xxxxxxxxxxxxx

#syz test

diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 075f7e9abe47..d1a34f928a18 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -314,7 +314,7 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)

void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
- struct gfs2_trans *tr = current->journal_info;
+ struct gfs2_trans *tr = bd->bd_tr;

BUG_ON(!list_empty(&bd->bd_list));
gfs2_add_revoke(sdp, bd);