====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ udevd/6964 is trying to acquire lock: ffff88803253a758 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: process_measurement+0x7e0/0x1c20 security/integrity/ima/ima_main.c:319 but task is already holding lock: ffff88801171e500 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (sb_writers#5){.+.+}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_write+0x4d/0x1c0 include/linux/fs/super.h:125 mnt_want_write+0x41/0x90 fs/namespace.c:494 ovl_xattr_set+0x15c/0x5f0 fs/overlayfs/xattrs.c:61 ovl_own_xattr_set+0x8b/0xb0 fs/overlayfs/xattrs.c:204 __vfs_setxattr+0x442/0x480 fs/xattr.c:223 __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257 vfs_setxattr+0x163/0x360 fs/xattr.c:344 do_setxattr fs/xattr.c:662 [inline] filename_setxattr+0x296/0x630 fs/xattr.c:690 path_setxattrat+0x408/0x450 fs/xattr.c:734 __do_sys_lsetxattr fs/xattr.c:775 [inline] __se_sys_lsetxattr fs/xattr.c:771 [inline] __x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:771 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #3 (&ovl_i_mutex_dir_key[depth]){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 inode_lock_shared include/linux/fs.h:1039 [inline] lookup_slow+0x46/0x70 fs/namei.c:1935 walk_component fs/namei.c:2282 [inline] lookup_last fs/namei.c:2789 [inline] path_lookupat+0x3f5/0x8c0 fs/namei.c:2813 filename_lookup+0x265/0x5d0 fs/namei.c:2842 kern_path+0x3d/0x150 fs/namei.c:3036 lookup_bdev+0xc8/0x290 block/bdev.c:1208 resume_store+0x16f/0x4f0 kernel/power/hibernate.c:1278 kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61e/0xbb0 fs/read_write.c:687 ksys_write+0x156/0x270 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&of->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 kernfs_seq_start+0x5d/0x420 fs/kernfs/file.c:165 seq_read_iter+0x37f/0xcb0 fs/seq_file.c:226 copy_splice_read+0x605/0xab0 fs/splice.c:362 do_splice_read fs/splice.c:980 [inline] splice_direct_to_actor+0x496/0xcc0 fs/splice.c:1084 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x19b/0x2a0 fs/splice.c:1228 do_sendfile+0x540/0x7e0 fs/read_write.c:1371 __do_sys_sendfile64 fs/read_write.c:1432 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1418 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&p->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 seq_read_iter+0xa5/0xcb0 fs/seq_file.c:183 __kernel_read+0x4d3/0x970 fs/read_write.c:532 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline] ima_calc_file_hash+0x45d/0x8a0 security/integrity/ima/ima_crypto.c:280 ima_collect_measurement+0x521/0xa10 security/integrity/ima/ima_api.c:300 process_measurement+0x1282/0x1c20 security/integrity/ima/ima_main.c:425 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4702 [inline] path_openat+0x2eac/0x3850 fs/namei.c:4863 do_file_open+0x23e/0x4a0 fs/namei.c:4892 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 process_measurement+0x7e0/0x1c20 security/integrity/ima/ima_main.c:319 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4702 [inline] path_openat+0x2eac/0x3850 fs/namei.c:4863 do_file_open+0x23e/0x4a0 fs/namei.c:4892 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &ima_iint_mutex_key[depth] --> &ovl_i_mutex_dir_key[depth] --> sb_writers#5 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(sb_writers#5); lock(&ovl_i_mutex_dir_key[depth]); lock(sb_writers#5); lock(&ima_iint_mutex_key[depth]); *** DEADLOCK *** 1 lock held by udevd/6964: #0: ffff88801171e500 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494 stack backtrace: CPU: 0 UID: 0 PID: 6964 Comm: udevd Tainted: G L syzkaller #0 PREEMPT_{RT,(full)} Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/rtmutex_api.c:559 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:578 process_measurement+0x7e0/0x1c20 security/integrity/ima/ima_main.c:319 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685 security_file_post_open+0xb3/0x260 security/security.c:2755 do_open fs/namei.c:4702 [inline] path_openat+0x2eac/0x3850 fs/namei.c:4863 do_file_open+0x23e/0x4a0 fs/namei.c:4892 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f84e0b66407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffeaa3b8450 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f84e0a78880 RCX: 00007f84e0b66407 RDX: 00000000000a0241 RSI: 00007ffeaa3b9110 RDI: ffffffffffffff9c RBP: 0000562df7fd9770 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000124 R11: 0000000000000202 R12: 0000562df7e72e20 R13: 00007ffeaa3b9110 R14: 00007ffeaa3b8d10 R15: 00007ffeaa3b8910