Forwarded: [syzbot] [jfs?] [fat?] general protection fault in txEnd

syzbot posted 1 patch 5 days, 11 hours ago
Forwarded: [syzbot] [jfs?] [fat?] general protection fault in txEnd
Posted by syzbot 5 days, 11 hours ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [syzbot] [jfs?] [fat?] general protection fault in txEnd
Author: rafad900@gmail.com

#syz test

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 60c4a0e0fca5..25b303276b82 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -97,6 +97,10 @@ static int jfs_create(struct mnt_idmap *idmap, struct
inode *dip,
        }

        tid = txBegin(dip->i_sb, 0);
+       if (tid == 0) {
+               jfs_err("jfs_create: unable to create tblk due to read only
filesystem");
+               return -EROFS;
+       }

        mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
        mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);