Re: [syzbot] [ocfs2?] possible deadlock in ocfs2_nfs_sync_lock
From: Hillf Danton
Date: Sat Aug 31 2024 - 08:31:02 EST
On Sat, 31 Aug 2024 02:46:20 -0700
> syzbot found the following issue on:
>
> HEAD commit: a18093afa393 Merge tag 'nfsd-6.11-2' of git://git.kernel.o..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f51063980000
#syz test upstream a18093afa393
--- l/fs/ocfs2/suballoc.c
+++ k/fs/ocfs2/suballoc.c
@@ -962,8 +962,10 @@ int ocfs2_reserve_new_metadata_blocks(st
{
int status;
int slot = ocfs2_get_meta_steal_slot(osb);
+ unsigned int pff = memalloc_nofs_save();
*ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
+ memalloc_nofs_restore(pff);
if (!(*ac)) {
status = -ENOMEM;
mlog_errno(status);
--