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

syzbot posted 1 patch 2 months ago
Forwarded: Re: [syzbot] [gfs2?] KASAN: null-ptr-deref Write in gfs2_trans_add_revoke
Posted by syzbot 2 months ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

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

#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);