Re: [syzbot] [xfs?] KASAN: null-ptr-deref Write in xfs_filestream_select_ag (2)
From: Edward Adam Davis
Date: Sat Oct 19 2024 - 23:35:24 EST
catch can't pick any perpag
#syz test
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index e3aaa0555597..f4c731fd61ea 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -159,6 +159,8 @@ xfs_filestream_pick_ag(
free = maxfree;
atomic_inc(&pag->pagf_fstrms);
}
+
+ return -ENOSPC;
} else if (max_pag) {
xfs_perag_rele(max_pag);
}