====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc6-syzkaller-00309-g1a61b828566f #0 Not tainted ------------------------------------------------------ kswapd0/128 is trying to acquire lock: ffff888015a62990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0xfb4/0x14a0 fs/jbd2/transaction.c:461 but task is already holding lock: ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: try_to_freeze_unsafe include/linux/freezer.h:58 [inline] ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: try_to_freeze include/linux/freezer.h:67 [inline] ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0xd1e/0x1580 mm/vmscan.c:4291 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:4674 [inline] fs_reclaim_acquire+0x115/0x160 mm/page_alloc.c:4688 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook mm/slab.h:700 [inline] slab_alloc_node mm/slub.c:3162 [inline] __kmalloc_node+0x5b/0x380 mm/slub.c:4473 kmalloc_node include/linux/slab.h:623 [inline] kvmalloc_node+0x3e/0x190 mm/util.c:613 kvmalloc include/linux/slab.h:750 [inline] ext4_xattr_inode_cache_find fs/ext4/xattr.c:1481 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1524 [inline] ext4_xattr_set_entry+0x1d94/0x3980 fs/ext4/xattr.c:1665 ext4_xattr_ibody_set+0x12d/0x3a0 fs/ext4/xattr.c:2225 ext4_xattr_set_handle+0x964/0x1500 fs/ext4/xattr.c:2382 ext4_xattr_set+0x13a/0x340 fs/ext4/xattr.c:2495 __vfs_setxattr+0x115/0x180 fs/xattr.c:182 __vfs_setxattr_noperm+0x125/0x5f0 fs/xattr.c:216 __vfs_setxattr_locked+0x1cf/0x260 fs/xattr.c:277 vfs_setxattr+0x11e/0x3c0 fs/xattr.c:313 setxattr+0x146/0x160 fs/xattr.c:623 path_setxattr+0x197/0x1c0 fs/xattr.c:642 __do_sys_setxattr fs/xattr.c:658 [inline] __se_sys_setxattr fs/xattr.c:654 [inline] __ia32_sys_setxattr+0xbc/0x150 fs/xattr.c:654 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+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 -> #1 (&ei->xattr_sem){++++}-{3:3}: down_write+0x90/0x150 kernel/locking/rwsem.c:1552 ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline] ext4_xattr_set_handle+0x15c/0x1500 fs/ext4/xattr.c:2309 __ext4_set_acl+0x338/0x570 fs/ext4/acl.c:217 ext4_set_acl+0x443/0x580 fs/ext4/acl.c:258 set_posix_acl+0x22d/0x2e0 fs/posix_acl.c:1015 posix_acl_xattr_set+0x135/0x1a0 fs/posix_acl.c:1034 __vfs_removexattr+0xfe/0x170 fs/xattr.c:483 __vfs_removexattr_locked+0x1ac/0x440 fs/xattr.c:518 vfs_removexattr+0xcb/0x250 fs/xattr.c:540 ovl_do_removexattr fs/overlayfs/overlayfs.h:270 [inline] ovl_workdir_create+0x486/0x930 fs/overlayfs/super.c:815 ovl_make_workdir fs/overlayfs/super.c:1369 [inline] ovl_get_workdir fs/overlayfs/super.c:1519 [inline] ovl_fill_super+0x1950/0x62b0 fs/overlayfs/super.c:2075 mount_nodev+0x60/0x110 fs/super.c:1446 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3568 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+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 -> #0 (jbd2_handle){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 start_this_handle+0xfe7/0x14a0 fs/jbd2/transaction.c:463 jbd2__journal_start+0x38c/0x910 fs/jbd2/transaction.c:520 __ext4_journal_start_sb+0x3a3/0x490 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x9d/0x110 fs/ext4/inode.c:5963 __mark_inode_dirty+0x48b/0x1040 fs/fs-writeback.c:2381 mark_inode_dirty_sync include/linux/fs.h:2467 [inline] iput.part.0+0x57/0x810 fs/inode.c:1771 iput+0x58/0x70 fs/inode.c:1764 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401 __dentry_kill+0x3c0/0x640 fs/dcache.c:607 shrink_dentry_list+0x23c/0x800 fs/dcache.c:1201 prune_dcache_sb+0xe7/0x140 fs/dcache.c:1282 super_cache_scan+0x336/0x590 fs/super.c:104 do_shrink_slab+0x428/0xbd0 mm/vmscan.c:831 shrink_slab+0x17c/0x6f0 mm/vmscan.c:991 shrink_node_memcgs mm/vmscan.c:3182 [inline] shrink_node+0x8c9/0x1e80 mm/vmscan.c:3304 kswapd_shrink_node mm/vmscan.c:4086 [inline] balance_pgdat+0x8ef/0x1580 mm/vmscan.c:4277 kswapd+0x79b/0xf80 mm/vmscan.c:4537 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 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 *** 3 locks held by kswapd0/128: #0: ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: try_to_freeze_unsafe include/linux/freezer.h:58 [inline] #0: ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: try_to_freeze include/linux/freezer.h:67 [inline] #0: ffffffff8c0c4480 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0xd1e/0x1580 mm/vmscan.c:4291 #1: ffffffff8c084490 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0xc9/0x6f0 mm/vmscan.c:981 #2: ffff888019da80e0 (&type->s_umount_key#32){++++}-{3:3}, at: trylock_super fs/super.c:415 [inline] #2: ffff888019da80e0 (&type->s_umount_key#32){++++}-{3:3}, at: super_cache_scan+0x6c/0x590 fs/super.c:79 stack backtrace: CPU: 3 PID: 128 Comm: kswapd0 Not tainted 6.0.0-rc6-syzkaller-00309-g1a61b828566f #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 start_this_handle+0xfe7/0x14a0 fs/jbd2/transaction.c:463 jbd2__journal_start+0x38c/0x910 fs/jbd2/transaction.c:520 __ext4_journal_start_sb+0x3a3/0x490 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x9d/0x110 fs/ext4/inode.c:5963 __mark_inode_dirty+0x48b/0x1040 fs/fs-writeback.c:2381 mark_inode_dirty_sync include/linux/fs.h:2467 [inline] iput.part.0+0x57/0x810 fs/inode.c:1771 iput+0x58/0x70 fs/inode.c:1764 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401 __dentry_kill+0x3c0/0x640 fs/dcache.c:607 shrink_dentry_list+0x23c/0x800 fs/dcache.c:1201 prune_dcache_sb+0xe7/0x140 fs/dcache.c:1282 super_cache_scan+0x336/0x590 fs/super.c:104 do_shrink_slab+0x428/0xbd0 mm/vmscan.c:831 shrink_slab+0x17c/0x6f0 mm/vmscan.c:991 shrink_node_memcgs mm/vmscan.c:3182 [inline] shrink_node+0x8c9/0x1e80 mm/vmscan.c:3304 kswapd_shrink_node mm/vmscan.c:4086 [inline] balance_pgdat+0x8ef/0x1580 mm/vmscan.c:4277 kswapd+0x79b/0xf80 mm/vmscan.c:4537 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306