====================================================== WARNING: possible circular locking dependency detected 5.0.0-rc4+ #50 Not tainted ------------------------------------------------------ syz-executor0/9636 is trying to acquire lock: 000000000f6e4d82 (&iint->mutex){+.+.}, at: process_measurement+0x41c/0x1be0 security/integrity/ima/ima_main.c:226 but task is already holding lock: 000000001c291b97 (sb_writers#12){.+.+}, at: sb_start_write include/linux/fs.h:1602 [inline] 000000001c291b97 (sb_writers#12){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:357 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: kobject: 'loop4' (000000007773c171): kobject_uevent_env -> #1 (sb_writers#12){.+.+}: percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x20b/0x360 fs/super.c:1389 sb_start_write include/linux/fs.h:1602 [inline] mnt_want_write+0x3f/0xc0 fs/namespace.c:357 ovl_want_write+0x76/0xa0 fs/overlayfs/util.c:24 ovl_open_maybe_copy_up+0x122/0x180 fs/overlayfs/copy_up.c:888 ovl_open+0xb3/0x270 fs/overlayfs/file.c:123 kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' do_dentry_open+0x48a/0x1210 fs/open.c:771 vfs_open fs/open.c:880 [inline] dentry_open+0x132/0x1d0 fs/open.c:896 ima_calc_file_hash+0x33f/0x570 security/integrity/ima/ima_crypto.c:427 ima_collect_measurement+0x5fc/0x710 security/integrity/ima/ima_api.c:231 process_measurement+0x11e4/0x1be0 security/integrity/ima/ima_main.c:286 ima_file_check+0xe3/0x130 security/integrity/ima/ima_main.c:393 do_last fs/namei.c:3422 [inline] path_openat+0x14d7/0x5650 fs/namei.c:3534 do_filp_open+0x26f/0x370 fs/namei.c:3564 do_sys_open+0x59a/0x7c0 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1084 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&iint->mutex){+.+.}: lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x12f/0x1670 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 process_measurement+0x41c/0x1be0 security/integrity/ima/ima_main.c:226 ima_file_check+0xe3/0x130 security/integrity/ima/ima_main.c:393 do_last fs/namei.c:3422 [inline] path_openat+0x14d7/0x5650 fs/namei.c:3534 do_filp_open+0x26f/0x370 fs/namei.c:3564 do_sys_open+0x59a/0x7c0 fs/open.c:1063 __do_sys_open fs/open.c:1081 [inline] __se_sys_open fs/open.c:1076 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1076 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#12); lock(&iint->mutex); lock(sb_writers#12); lock(&iint->mutex); *** DEADLOCK *** 1 lock held by syz-executor0/9636: #0: 000000001c291b97 (sb_writers#12){.+.+}, at: sb_start_write include/linux/fs.h:1602 [inline] #0: 000000001c291b97 (sb_writers#12){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:357 stack backtrace: CPU: 1 PID: 9636 Comm: syz-executor0 Not tainted 5.0.0-rc4+ #50 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1db/0x2d0 lib/dump_stack.c:113 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1224 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2350 [inline] __lock_acquire+0x3014/0x4a30 kernel/locking/lockdep.c:3338 lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x12f/0x1670 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 process_measurement+0x41c/0x1be0 security/integrity/ima/ima_main.c:226 kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' ima_file_check+0xe3/0x130 security/integrity/ima/ima_main.c:393 kobject: 'loop4' (000000007773c171): kobject_uevent_env do_last fs/namei.c:3422 [inline] path_openat+0x14d7/0x5650 fs/namei.c:3534 kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' do_filp_open+0x26f/0x370 fs/namei.c:3564 kobject: 'loop4' (000000007773c171): kobject_uevent_env do_sys_open+0x59a/0x7c0 fs/open.c:1063 kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' __do_sys_open fs/open.c:1081 [inline] __se_sys_open fs/open.c:1076 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1076 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458089 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4cd2d08c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458089 RDX: 0000000000000000 RSI: 8000000000141042 RDI: 0000000020000180 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4cd2d096d4 R13: 00000000004f4d9f R14: 00000000004d7210 R15: 00000000ffffffff ecryptfs_parse_options: eCryptfs: unrecognized option [tmpfs] ecryptfs_parse_options: You must supply at least one valid auth tok signature as a mount parameter; see the eCryptfs README Error parsing options; rc = [-22] kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (0000000053331474): kobject_uevent_env kobject: 'loop2' (0000000053331474): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop0' (00000000d02997cf): kobject_uevent_env kobject: 'loop0' (00000000d02997cf): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000cc4a025b): kobject_uevent_env kobject: 'loop3' (00000000cc4a025b): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop5' (00000000a71ea645): kobject_uevent_env kobject: 'loop5' (00000000a71ea645): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop4' (000000007773c171): kobject_uevent_env kobject: 'loop4' (000000007773c171): fill_kobj_path: path = '/devices/virtual/block/loop4'