[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_656E089498E91AEFC2CFEC78566F042E410A@qq.com>
Date: Sat, 17 Aug 2024 07:16:44 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+3c010e21296f33a5dc16@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: [syzbot] [jfs?] KASAN: slab-use-after-free Read in dbFreeBits
sync jfs remount and jfs ioctrl with s_umount
#syz test: upstream master
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index cb3cda1390ad..a409ae18454a 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1645,7 +1645,9 @@ s64 dbDiscardAG(struct inode *ip, int agno, s64 minlen)
* call jfs_issue_discard() itself */
if (!(JFS_SBI(sb)->flag & JFS_DISCARD))
jfs_issue_discard(ip, tt->blkno, tt->nblocks);
+ down_read(&sb->s_umount);
dbFree(ip, tt->blkno, tt->nblocks);
+ up_read(&sb->s_umount);
trimmed += tt->nblocks;
}
kfree(totrim);
Powered by blists - more mailing lists