====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.7.5565/24287 is trying to acquire lock: ffff88803394d078 (&of->mutex){+.+.}-{4:4}, at: kernfs_seq_start+0x5d/0x420 fs/kernfs/file.c:165 but task is already holding lock: ffff88802ac9fdb0 (&p->lock){+.+.}-{4:4}, at: seq_read_iter+0xa5/0xcb0 fs/seq_file.c:183 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&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 -> #3 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}: __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 -> #2 (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_set_or_remove_acl fs/overlayfs/inode.c:505 [inline] ovl_set_acl+0x359/0x860 fs/overlayfs/inode.c:554 set_posix_acl fs/posix_acl.c:962 [inline] vfs_remove_acl+0x56e/0x870 fs/posix_acl.c:1249 removexattr fs/xattr.c:1035 [inline] filename_removexattr fs/xattr.c:1064 [inline] path_removexattrat+0x51d/0x760 fs/xattr.c:1097 __do_sys_lremovexattr fs/xattr.c:1115 [inline] __se_sys_lremovexattr fs/xattr.c:1112 [inline] __x64_sys_lremovexattr+0x65/0x80 fs/xattr.c:1112 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 (&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 -> #0 (&of->mutex){+.+.}-{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 kernfs_seq_start+0x5d/0x420 fs/kernfs/file.c:165 seq_read_iter+0x37f/0xcb0 fs/seq_file.c:226 __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 other info that might help us debug this: Chain exists of: &of->mutex --> &ima_iint_mutex_key[depth] --> &p->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(&ima_iint_mutex_key[depth]); lock(&p->lock); lock(&of->mutex); *** DEADLOCK *** 2 locks held by syz.7.5565/24287: #0: ffff888028169c58 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: process_measurement+0x7e0/0x1c20 security/integrity/ima/ima_main.c:319 #1: ffff88802ac9fdb0 (&p->lock){+.+.}-{4:4}, at: seq_read_iter+0xa5/0xcb0 fs/seq_file.c:183 stack backtrace: CPU: 1 UID: 0 PID: 24287 Comm: syz.7.5565 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 kernfs_seq_start+0x5d/0x420 fs/kernfs/file.c:165 seq_read_iter+0x37f/0xcb0 fs/seq_file.c:226 __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 RIP: 0033:0x7fb20381e019 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb201611028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fb203aa6270 RCX: 00007fb20381e019 RDX: 0000000000000082 RSI: 00002000000000c0 RDI: ffffffffffffff9c RBP: 00007fb2038b500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000074 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb203aa6308 R14: 00007fb203aa6270 R15: 00007ffdf59b9498