Re: [syzbot] [efi?] [fs?] possible deadlock in efivarfs_actor
From: Hillf Danton
Date: Sun Mar 09 2025 - 05:21:51 EST
On Sat, 08 Mar 2025 18:52:38 -0800
> syzbot found the following issue on:
>
> HEAD commit: e056da87c780 Merge remote-tracking branch 'will/for-next/p..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13b97c64580000
#syz test upstream master
--- x/fs/efivarfs/super.c
+++ y/fs/efivarfs/super.c
@@ -421,7 +421,7 @@ static bool efivarfs_actor(struct dir_co
if (err)
size = 0;
- inode_lock(inode);
+ inode_lock_nested(inode, I_MUTEX_CHILD);
i_size_write(inode, size);
inode_unlock(inode);
--