====================================================== WARNING: possible circular locking dependency detected 5.10.49 #1 Not tainted ------------------------------------------------------ systemd-udevd/110 is trying to acquire lock: ffff88800f6c88e0 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0xf94/0x1390 fs/jbd2/transaction.c:449 but task is already holding lock: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_release mm/page_alloc.c:4315 [inline] ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_release mm/page_alloc.c:4311 [inline] ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:4339 [inline] ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:4356 [inline] ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0x12bd/0x2210 mm/page_alloc.c:4760 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (fs_reclaim){+.+.}-{0:0}: __fs_reclaim_acquire mm/page_alloc.c:4296 [inline] fs_reclaim_acquire+0xc1/0xf0 mm/page_alloc.c:4307 slab_pre_alloc_hook mm/slab.h:511 [inline] slab_alloc_node mm/slub.c:2814 [inline] __kmalloc_node+0x5c/0x4b0 mm/slub.c:4006 kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:575 kvmalloc include/linux/mm.h:765 [inline] ext4_xattr_inode_cache_find fs/ext4/xattr.c:1465 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1508 [inline] ext4_xattr_set_entry+0x1e12/0x3880 fs/ext4/xattr.c:1649 ext4_xattr_block_set+0x5be/0x2f30 fs/ext4/xattr.c:1872 ext4_xattr_set_handle+0xd49/0x1310 fs/ext4/xattr.c:2394 ext4_xattr_set+0x13a/0x340 fs/ext4/xattr.c:2495 __vfs_setxattr+0x10f/0x170 fs/xattr.c:177 __vfs_setxattr_noperm+0x11a/0x4c0 fs/xattr.c:208 __vfs_setxattr_locked+0x1bf/0x250 fs/xattr.c:266 vfs_setxattr+0xe8/0x270 fs/xattr.c:283 setxattr+0x23d/0x330 fs/xattr.c:548 path_setxattr+0x170/0x190 fs/xattr.c:567 __do_sys_lsetxattr fs/xattr.c:589 [inline] __se_sys_lsetxattr fs/xattr.c:585 [inline] __x64_sys_lsetxattr+0xbd/0x150 fs/xattr.c:585 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&ei->xattr_sem){++++}-{3:3}: down_write+0x92/0x150 kernel/locking/rwsem.c:1557 ext4_write_lock_xattr fs/ext4/xattr.h:142 [inline] ext4_xattr_set_handle+0x15e/0x1310 fs/ext4/xattr.c:2309 ext4_xattr_set+0x13a/0x340 fs/ext4/xattr.c:2495 __vfs_setxattr+0x10f/0x170 fs/xattr.c:177 __vfs_setxattr_noperm+0x11a/0x4c0 fs/xattr.c:208 __vfs_setxattr_locked+0x1bf/0x250 fs/xattr.c:266 vfs_setxattr+0xe8/0x270 fs/xattr.c:283 setxattr+0x23d/0x330 fs/xattr.c:548 path_setxattr+0x170/0x190 fs/xattr.c:567 __do_sys_lsetxattr fs/xattr.c:589 [inline] __se_sys_lsetxattr fs/xattr.c:585 [inline] __x64_sys_lsetxattr+0xbd/0x150 fs/xattr.c:585 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (jbd2_handle){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:2871 [inline] check_prevs_add kernel/locking/lockdep.c:2996 [inline] validate_chain kernel/locking/lockdep.c:3611 [inline] __lock_acquire+0x2a48/0x5a80 kernel/locking/lockdep.c:4836 lock_acquire kernel/locking/lockdep.c:5446 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5411 start_this_handle+0xfc7/0x1390 fs/jbd2/transaction.c:451 jbd2__journal_start+0x38c/0x880 fs/jbd2/transaction.c:508 __ext4_journal_start_sb+0x210/0x420 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:328 [inline] ext4_dirty_inode+0xbc/0x130 fs/ext4/inode.c:5949 __mark_inode_dirty+0x9a4/0x1020 fs/fs-writeback.c:2262 mark_inode_dirty_sync include/linux/fs.h:2188 [inline] iput.part.0+0x57/0x780 fs/inode.c:1679 iput+0x58/0x70 fs/inode.c:1672 dentry_unlink_inode+0x2b4/0x3e0 fs/dcache.c:374 __dentry_kill+0x36f/0x5c0 fs/dcache.c:579 shrink_dentry_list+0x14b/0x490 fs/dcache.c:1141 prune_dcache_sb+0xe7/0x140 fs/dcache.c:1222 super_cache_scan+0x331/0x580 fs/super.c:105 do_shrink_slab+0x3bc/0x8d0 mm/vmscan.c:513 shrink_slab+0x16f/0x600 mm/vmscan.c:674 shrink_node_memcgs mm/vmscan.c:2654 [inline] shrink_node+0x8a7/0x1cf0 mm/vmscan.c:2769 shrink_zones mm/vmscan.c:2972 [inline] do_try_to_free_pages+0x38b/0x1420 mm/vmscan.c:3027 try_to_free_pages+0x285/0x610 mm/vmscan.c:3266 __perform_reclaim mm/page_alloc.c:4335 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:4356 [inline] __alloc_pages_slowpath.constprop.0+0x81e/0x2210 mm/page_alloc.c:4760 __alloc_pages_nodemask+0x558/0x680 mm/page_alloc.c:4970 alloc_pages_current+0x187/0x280 mm/mempolicy.c:2271 alloc_pages include/linux/gfp.h:547 [inline] __get_free_pages+0xc/0xa0 mm/page_alloc.c:4994 selinux_genfs_get_sid security/selinux/hooks.c:1292 [inline] inode_doinit_with_dentry+0x8ed/0x1240 security/selinux/hooks.c:1512 selinux_d_instantiate+0x23/0x30 security/selinux/hooks.c:6290 security_d_instantiate+0x56/0xe0 security/security.c:1973 d_splice_alias+0x8c/0xc60 fs/dcache.c:3029 kernfs_iop_lookup+0x1ac/0x220 fs/kernfs/dir.c:1108 __lookup_slow+0x252/0x490 fs/namei.c:1544 lookup_slow fs/namei.c:1561 [inline] walk_component+0x41a/0x6a0 fs/namei.c:1856 lookup_last fs/namei.c:2305 [inline] path_lookupat+0x1ba/0x850 fs/namei.c:2329 filename_lookup+0x19f/0x560 fs/namei.c:2362 do_readlinkat+0xcd/0x2f0 fs/stat.c:415 __do_sys_readlinkat fs/stat.c:442 [inline] __se_sys_readlinkat fs/stat.c:439 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:439 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: jbd2_handle --> &ei->xattr_sem --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&ei->xattr_sem); lock(fs_reclaim); lock(jbd2_handle); *** DEADLOCK *** 5 locks held by systemd-udevd/110: #0: ffff8880155b4a00 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:784 [inline] #0: ffff8880155b4a00 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: lookup_slow fs/namei.c:1560 [inline] #0: ffff8880155b4a00 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: walk_component+0x40b/0x6a0 fs/namei.c:1856 #1: ffffffff84ee0088 (kernfs_mutex){+.+.}-{3:3}, at: kernfs_iop_lookup+0x4a/0x220 fs/kernfs/dir.c:1087 #2: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_release mm/page_alloc.c:4315 [inline] #2: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_release mm/page_alloc.c:4311 [inline] #2: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __perform_reclaim mm/page_alloc.c:4339 [inline] #2: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_direct_reclaim mm/page_alloc.c:4356 [inline] #2: ffffffff84e8f2a0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0x12bd/0x2210 mm/page_alloc.c:4760 #3: ffffffff84e6ba30 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0xc7/0x600 mm/vmscan.c:664 #4: ffff88800f6aa0e0 (&type->s_umount_key#42){++++}-{3:3}, at: trylock_super fs/super.c:418 [inline] #4: ffff88800f6aa0e0 (&type->s_umount_key#42){++++}-{3:3}, at: super_cache_scan+0x71/0x580 fs/super.c:80 stack backtrace: CPU: 1 PID: 110 Comm: systemd-udevd Not tainted 5.10.49 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2120 check_prev_add kernel/locking/lockdep.c:2871 [inline] check_prevs_add kernel/locking/lockdep.c:2996 [inline] validate_chain kernel/locking/lockdep.c:3611 [inline] __lock_acquire+0x2a48/0x5a80 kernel/locking/lockdep.c:4836 lock_acquire kernel/locking/lockdep.c:5446 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5411 start_this_handle+0xfc7/0x1390 fs/jbd2/transaction.c:451 jbd2__journal_start+0x38c/0x880 fs/jbd2/transaction.c:508 __ext4_journal_start_sb+0x210/0x420 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:328 [inline] ext4_dirty_inode+0xbc/0x130 fs/ext4/inode.c:5949 __mark_inode_dirty+0x9a4/0x1020 fs/fs-writeback.c:2262 mark_inode_dirty_sync include/linux/fs.h:2188 [inline] iput.part.0+0x57/0x780 fs/inode.c:1679 iput+0x58/0x70 fs/inode.c:1672 dentry_unlink_inode+0x2b4/0x3e0 fs/dcache.c:374 __dentry_kill+0x36f/0x5c0 fs/dcache.c:579 shrink_dentry_list+0x14b/0x490 fs/dcache.c:1141 prune_dcache_sb+0xe7/0x140 fs/dcache.c:1222 super_cache_scan+0x331/0x580 fs/super.c:105 do_shrink_slab+0x3bc/0x8d0 mm/vmscan.c:513 shrink_slab+0x16f/0x600 mm/vmscan.c:674 shrink_node_memcgs mm/vmscan.c:2654 [inline] shrink_node+0x8a7/0x1cf0 mm/vmscan.c:2769 shrink_zones mm/vmscan.c:2972 [inline] do_try_to_free_pages+0x38b/0x1420 mm/vmscan.c:3027 try_to_free_pages+0x285/0x610 mm/vmscan.c:3266 __perform_reclaim mm/page_alloc.c:4335 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:4356 [inline] __alloc_pages_slowpath.constprop.0+0x81e/0x2210 mm/page_alloc.c:4760 __alloc_pages_nodemask+0x558/0x680 mm/page_alloc.c:4970 alloc_pages_current+0x187/0x280 mm/mempolicy.c:2271 alloc_pages include/linux/gfp.h:547 [inline] __get_free_pages+0xc/0xa0 mm/page_alloc.c:4994 selinux_genfs_get_sid security/selinux/hooks.c:1292 [inline] inode_doinit_with_dentry+0x8ed/0x1240 security/selinux/hooks.c:1512 selinux_d_instantiate+0x23/0x30 security/selinux/hooks.c:6290 security_d_instantiate+0x56/0xe0 security/security.c:1973 d_splice_alias+0x8c/0xc60 fs/dcache.c:3029 kernfs_iop_lookup+0x1ac/0x220 fs/kernfs/dir.c:1108 __lookup_slow+0x252/0x490 fs/namei.c:1544 lookup_slow fs/namei.c:1561 [inline] walk_component+0x41a/0x6a0 fs/namei.c:1856 lookup_last fs/namei.c:2305 [inline] path_lookupat+0x1ba/0x850 fs/namei.c:2329 filename_lookup+0x19f/0x560 fs/namei.c:2362 do_readlinkat+0xcd/0x2f0 fs/stat.c:415 __do_sys_readlinkat fs/stat.c:442 [inline] __se_sys_readlinkat fs/stat.c:439 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:439 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f99e5cd80ba Code: 48 8b 0d e1 bd 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 0b 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ae bd 2b 00 f7 d8 64 89 01 48 RSP: 002b:00007ffd7c82b108 EFLAGS: 00000206 ORIG_RAX: 000000000000010b RAX: ffffffffffffffda RBX: 00005605451cd7c0 RCX: 00007f99e5cd80ba RDX: 00005605451cd7c0 RSI: 00005605451cbb50 RDI: 00000000ffffff9c RBP: 0000000000000064 R08: 0000560543338670 R09: 0000000000000070 R10: 0000000000000063 R11: 0000000000000206 R12: 00005605451cbb50 R13: 00000000ffffff9c R14: 00007ffd7c82b160 R15: 0000000000000063