INFO: task syz-executor.3:17018 blocked for more than 143 seconds. Not tainted 6.3.0-next-20230505-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:25528 pid:17018 ppid:5067 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5343 [inline] __schedule+0x1d15/0x5790 kernel/sched/core.c:6669 schedule+0xde/0x1a0 kernel/sched/core.c:6745 io_schedule+0xbe/0x130 kernel/sched/core.c:8979 bit_wait_io+0x16/0xe0 kernel/sched/wait_bit.c:209 __wait_on_bit_lock+0x11f/0x1a0 kernel/sched/wait_bit.c:90 out_of_line_wait_on_bit_lock+0xd9/0x110 kernel/sched/wait_bit.c:117 wait_on_bit_lock_io include/linux/wait_bit.h:208 [inline] __lock_buffer fs/buffer.c:70 [inline] lock_buffer include/linux/buffer_head.h:406 [inline] __sync_dirty_buffer+0x30e/0x380 fs/buffer.c:2807 __ext4_handle_dirty_metadata+0x2b7/0x8e0 fs/ext4/ext4_jbd2.c:387 ext4_handle_dirty_dirblock+0x371/0x470 fs/ext4/namei.c:438 ext4_finish_convert_inline_dir fs/ext4/inline.c:1178 [inline] ext4_convert_inline_data_nolock+0xac1/0xf10 fs/ext4/inline.c:1255 ext4_convert_inline_data+0x51a/0x5f0 fs/ext4/inline.c:2063 ext4_set_context+0x16f/0x5a0 fs/ext4/crypto.c:155 set_encryption_policy+0x282/0x430 fs/crypto/policy.c:473 fscrypt_ioctl_set_policy+0x3ce/0x460 fs/crypto/policy.c:526 __ext4_ioctl+0x20f4/0x4b00 fs/ext4/ioctl.c:1501 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff537a8c169 RSP: 002b:00007ff5387ce168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff537babf80 RCX: 00007ff537a8c169 RDX: 0000000020000000 RSI: 00000000800c6613 RDI: 0000000000000004 RBP: 00007ff537ae7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb1416b3f R14: 00007ff5387ce300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by rcu_tasks_kthre/13: #0: ffffffff8c798e30 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0xd80 kernel/rcu/tasks.h:518 1 lock held by rcu_tasks_trace/14: #0: ffffffff8c798b30 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0xd80 kernel/rcu/tasks.h:518 1 lock held by khungtaskd/28: #0: ffffffff8c799a40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x390 kernel/locking/lockdep.c:6559 2 locks held by syslogd/4440: #0: ffff8880b993c5d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2f/0x120 kernel/sched/core.c:558 #1: ffff8880b9928848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x2de/0x950 kernel/sched/psi.c:996 2 locks held by kworker/1:3/4749: #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1324 [inline] #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline] #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline] #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376 #1: ffffc900034cfdb0 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380 2 locks held by getty/4760: #0: ffff88814bae8098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x26/0x80 drivers/tty/tty_ldisc.c:243 #1: ffffc900015b02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xef4/0x13e0 drivers/tty/n_tty.c:2176 3 locks held by kworker/1:6/5113: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1324 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376 #1: ffffc90004adfdb0 (free_ipc_work){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380 #2: ffffffff8c7a4eb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline] #2: ffffffff8c7a4eb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3e8/0x770 kernel/rcu/tree_exp.h:992 3 locks held by kworker/u4:8/6423: #0: ffff8880b993c5d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2f/0x120 kernel/sched/core.c:558 #1: ffff8880b9928848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x216/0x950 kernel/sched/psi.c:984 #2: ffff8880b99296d8 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x5a/0x1f0 kernel/time/timer.c:999 3 locks held by kworker/1:10/8084: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1324 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline] #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376 #1: ffffc90005a4fdb0 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380 #2: ffffffff8c7a4eb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:293 [inline] #2: ffffffff8c7a4eb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x64a/0x770 kernel/rcu/tree_exp.h:992 3 locks held by syz-executor.3/17018: #0: ffff888078c84460 (sb_writers#4){.+.+}-{0:0}, at: fscrypt_ioctl_set_policy+0x17b/0x460 fs/crypto/policy.c:511 #1: ffff88808bade800 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] #1: ffff88808bade800 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: fscrypt_ioctl_set_policy+0x1a4/0x460 fs/crypto/policy.c:515 #2: ffff88808bade4c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline] #2: ffff88808bade4c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_convert_inline_data+0x352/0x5f0 fs/ext4/inline.c:2061 3 locks held by syz-executor.1/17601: #0: ffff888097f28460 (sb_writers#4){.+.+}-{0:0}, at: fscrypt_ioctl_set_policy+0x17b/0x460 fs/crypto/policy.c:511 #1: ffff888095406800 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] #1: ffff888095406800 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: fscrypt_ioctl_set_policy+0x1a4/0x460 fs/crypto/policy.c:515 #2: ffff8880954064c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline] #2: ffff8880954064c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_convert_inline_data+0x352/0x5f0 fs/ext4/inline.c:2061 1 lock held by syz-executor.0/18001: #0: ffffffff8c7a4d80 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x6a0 kernel/rcu/tree.c:3961 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.3.0-next-20230505-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 nmi_cpu_backtrace+0x29c/0x350 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x2a4/0x300 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline] watchdog+0xe16/0x1090 kernel/hung_task.c:379 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 8084 Comm: kworker/1:10 Not tainted 6.3.0-next-20230505-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: events pwq_unbound_release_workfn RIP: 0010:remove_class_from_lock_chains kernel/locking/lockdep.c:6059 [inline] RIP: 0010:zap_class+0x2f3/0x990 kernel/locking/lockdep.c:6104 Code: e8 48 c1 e8 03 80 3c 28 00 0f 85 57 01 00 00 49 8b 57 08 48 85 d2 74 0d 48 83 ea 08 49 89 d7 0f 85 47 ff ff ff 48 83 04 24 08 <48> 8b 04 24 48 3d 60 cc 51 91 0f 85 fa fe ff ff 48 83 05 d5 63 06 RSP: 0018:ffffc90005a4fbb0 EFLAGS: 00000096 RAX: ffffffff91423098 RBX: ffffffff91524cc8 RCX: ffffffff8164f202 RDX: 0000000000000000 RSI: 00000000000004f7 RDI: 0000000000000000 RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffffff9017df9a R10: fffffbfff22a69cf R11: 0000000000008aed R12: 0000000000000bf7 R13: ffffffff904408c8 R14: 0000000000008aed R15: ffffffff904408c0 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2cd3f000 CR3: 000000003e4d0000 CR4: 00000000003526e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __lockdep_free_key_range+0x56/0x110 kernel/locking/lockdep.c:6223 lockdep_unregister_key+0x258/0x460 kernel/locking/lockdep.c:6419 wq_unregister_lockdep kernel/workqueue.c:3615 [inline] pwq_unbound_release_workfn+0x258/0x340 kernel/workqueue.c:3863 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308