Re: [syzbot] [fscrypt?] possible deadlock in fscrypt_initialize (2)

From: Eric Biggers
Date: Wed Mar 01 2023 - 14:02:51 EST


On Wed, Mar 01, 2023 at 07:04:59AM -0800, syzbot wrote:
> -> #1 (fs_reclaim){+.+.}-{0:0}:
> __fs_reclaim_acquire mm/page_alloc.c:4716 [inline]
> fs_reclaim_acquire+0x11d/0x160 mm/page_alloc.c:4730
> might_alloc include/linux/sched/mm.h:271 [inline]
> slab_pre_alloc_hook mm/slab.h:728 [inline]
> slab_alloc_node mm/slub.c:3434 [inline]
> __kmem_cache_alloc_node+0x41/0x330 mm/slub.c:3491
> kmalloc_node_trace+0x21/0x60 mm/slab_common.c:1074
> kmalloc_node include/linux/slab.h:606 [inline]
> kzalloc_node include/linux/slab.h:731 [inline]
> mempool_create_node mm/mempool.c:272 [inline]
> mempool_create+0x52/0xc0 mm/mempool.c:261
> mempool_create_page_pool include/linux/mempool.h:112 [inline]
> fscrypt_initialize+0x8a/0xa0 fs/crypto/crypto.c:332
> fscrypt_setup_encryption_info+0xef/0xeb0 fs/crypto/keysetup.c:563
> fscrypt_get_encryption_info+0x375/0x450 fs/crypto/keysetup.c:668
> fscrypt_setup_filename+0x23c/0xec0 fs/crypto/fname.c:458
> ext4_fname_setup_filename+0x8c/0x110 fs/ext4/crypto.c:28
> ext4_find_entry+0x8c/0x140 fs/ext4/namei.c:1725
> ext4_rename+0x51d/0x26d0 fs/ext4/namei.c:3829
> ext4_rename2+0x1c7/0x270 fs/ext4/namei.c:4193
> vfs_rename+0xef6/0x17a0 fs/namei.c:4772
> do_renameat2+0xb62/0xc90 fs/namei.c:4923
> __do_sys_renameat2 fs/namei.c:4956 [inline]
> __se_sys_renameat2 fs/namei.c:4953 [inline]
> __ia32_sys_renameat2+0xe8/0x120 fs/namei.c:4953
> do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
> __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
> do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
> entry_SYSENTER_compat_after_hwframe+0x70/0x82

#syz dup: possible deadlock in start_this_handle (4)

- Eric