syzbot


INFO: task hung in kernfs_iop_permission (3)

Status: auto-obsoleted due to no activity on 2023/05/13 13:27
Subsystems: kernfs arm
[Documentation on labels]
First crash: 514d, last: 440d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in kernfs_iop_permission 1 1510d 1510d 0/1 auto-closed as invalid on 2020/07/06 20:13
upstream INFO: task hung in kernfs_iop_permission (2) kernfs 3 622d 715d 0/26 auto-obsoleted due to no activity on 2022/11/12 03:55
upstream INFO: task hung in kernfs_iop_permission kernfs 2 1732d 1735d 0/26 auto-closed as invalid on 2019/10/28 16:51
android-414 INFO: task hung in kernfs_iop_permission 2 1718d 1766d 0/1 auto-closed as invalid on 2019/12/12 06:07

Sample crash report:
INFO: task udevd:4423 blocked for more than 143 seconds.
      Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:22696 pid:4423  ppid:1      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 rwsem_down_read_slowpath+0x5fe/0x950 kernel/locking/rwsem.c:1095
 __down_read_common+0x54/0x2a0 kernel/locking/rwsem.c:1260
 kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:458 [inline]
 inode_permission+0x22c/0x450 fs/namei.c:525
 may_lookup fs/namei.c:1715 [inline]
 link_path_walk+0x2d5/0xee0 fs/namei.c:2262
 path_lookupat+0xab/0x450 fs/namei.c:2473
 filename_lookup+0x285/0x660 fs/namei.c:2503
 user_path_at_empty+0x40/0x1a0 fs/namei.c:2876
 do_readlinkat+0x11b/0x3b0 fs/stat.c:471
 __do_sys_readlink fs/stat.c:504 [inline]
 __se_sys_readlink fs/stat.c:501 [inline]
 __x64_sys_readlink+0x7b/0x90 fs/stat.c:501
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f9546327277
RSP: 002b:00007ffcd0e61188 EFLAGS: 00000246 ORIG_RAX: 0000000000000059
RAX: ffffffffffffffda RBX: 00007ffcd0e61198 RCX: 00007f9546327277
RDX: 0000000000000400 RSI: 00007ffcd0e61198 RDI: 00007ffcd0e61678
RBP: 0000000000000400 R08: 0000000000007fff R09: 00007ffcd0e61d50
R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffcd0e61678
R13: 00007ffcd0e615e8 R14: 0000563ffb627910 R15: 0000000000000000
 </TASK>
INFO: task syz-executor.3:5102 blocked for more than 143 seconds.
      Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:21264 pid:5102  ppid:1      flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 rwsem_down_read_slowpath+0x5fe/0x950 kernel/locking/rwsem.c:1095
 __down_read_common+0x54/0x2a0 kernel/locking/rwsem.c:1260
 kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:458 [inline]
 inode_permission+0x22c/0x450 fs/namei.c:525
 may_lookup fs/namei.c:1715 [inline]
 link_path_walk+0x2d5/0xee0 fs/namei.c:2262
 path_openat+0x237/0x2de0 fs/namei.c:3710
 do_filp_open+0x275/0x500 fs/namei.c:3741
 do_sys_openat2+0x13b/0x500 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ffa5cc8bc18
RSP: 002b:00007ffee01aa050 EFLAGS: 00000287 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00000000000002ac RCX: 00007ffa5cc8bc18
RDX: 0000000000090800 RSI: 00007ffa5cce6bc8 RDI: 00000000ffffff9c
RBP: 00007ffee01aa11c R08: 0000000000090800 R09: 00007ffa5cce6bc8
R10: 0000000000000000 R11: 0000000000000287 R12: 0000000000000000
R13: 00000000000c3916 R14: 0000000000000010 R15: 00007ffee01aa180
 </TASK>
INFO: task kworker/u4:50:9284 blocked for more than 144 seconds.
      Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:50   state:D stack:22368 pid:9284  ppid:2      flags:0x00004000
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 rwsem_down_write_slowpath+0xfdc/0x14a0 kernel/locking/rwsem.c:1190
 __down_write_common kernel/locking/rwsem.c:1305 [inline]
 __down_write kernel/locking/rwsem.c:1314 [inline]
 down_write+0x231/0x270 kernel/locking/rwsem.c:1563
 kernfs_remove_by_name_ns+0x76/0x150 fs/kernfs/dir.c:1657
 kernfs_remove_by_name include/linux/kernfs.h:618 [inline]
 remove_files fs/sysfs/group.c:28 [inline]
 sysfs_remove_group+0x102/0x2b0 fs/sysfs/group.c:288
 sysfs_remove_groups+0x5b/0xb0 fs/sysfs/group.c:312
 destroy_gid_attrs drivers/infiniband/core/sysfs.c:1189 [inline]
 ib_free_port_attrs+0xbc/0x400 drivers/infiniband/core/sysfs.c:1414
 remove_one_compat_dev drivers/infiniband/core/device.c:1002 [inline]
 rdma_dev_exit_net+0x1f1/0x360 drivers/infiniband/core/device.c:1140
 ops_exit_list net/core/net_namespace.c:169 [inline]
 cleanup_net+0x758/0xc60 net/core/net_namespace.c:606
 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
INFO: task udevadm:11034 blocked for more than 144 seconds.
      Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevadm         state:D stack:24704 pid:11034 ppid:10839  flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 rwsem_down_read_slowpath+0x5fe/0x950 kernel/locking/rwsem.c:1095
 __down_read_common+0x54/0x2a0 kernel/locking/rwsem.c:1260
 kernfs_iop_getattr+0xca/0x360 fs/kernfs/inode.c:192
 vfs_getattr fs/stat.c:164 [inline]
 vfs_statx+0x1ca/0x4b0 fs/stat.c:236
 vfs_fstatat fs/stat.c:270 [inline]
 __do_sys_newfstatat fs/stat.c:440 [inline]
 __se_sys_newfstatat+0x104/0x7b0 fs/stat.c:434
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7efcbf5251da
RSP: 002b:00007ffc7c062b78 EFLAGS: 00000206 ORIG_RAX: 0000000000000106
RAX: ffffffffffffffda RBX: 00007efcbf5f2380 RCX: 00007efcbf5251da
RDX: 00007ffc7c062b80 RSI: 00007efcbf5bb75a RDI: 0000000000000005
RBP: 00005560af4ed2a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000206 R12: 00005560af4ed2a0
R13: 0000000000000000 R14: 00007ffc7c063158 R15: 0000000000003fff
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d523910 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d524110 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/28:
 #0: ffffffff8d523740 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by udevd/4423:
 #0: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288
2 locks held by getty/4738:
 #0: ffff888028421098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900015b02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6e8/0x1e50 drivers/tty/n_tty.c:2177
1 lock held by syz-executor.3/5102:
 #0: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288
1 lock held by syz-executor.4/5106:
 #0: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288
3 locks held by kworker/1:6/5158:
 #0: ffff88802796c538 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262
 #1: ffffc9000474fd00 ((work_completion)(&(&net->ipv6.addr_chk_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264
 #2: ffffffff8e664088 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_verify_work+0x15/0x30 net/ipv6/addrconf.c:4624
3 locks held by kworker/0:9/5719:
 #0: ffff88802796c538 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262
 #1: ffffc9000ab4fd00 ((work_completion)(&(&net->ipv6.addr_chk_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264
 #2: ffffffff8e664088 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_verify_work+0x15/0x30 net/ipv6/addrconf.c:4624
4 locks held by kworker/u4:50/9284:
 #0: ffff8880129db138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262
 #1: ffffc90003e6fd00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264
 #2: ffffffff8e657cd0 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf0/0xc60 net/core/net_namespace.c:568
 #3: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_remove_by_name_ns+0x76/0x150 fs/kernfs/dir.c:1657
2 locks held by syz-executor.1/11011:
 #0: ffffffff8e657cd0 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x332/0x5a0 net/core/net_namespace.c:479
 #1: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_remove_by_name_ns+0x76/0x150 fs/kernfs/dir.c:1657
1 lock held by udevadm/11034:
 #0: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_getattr+0xca/0x360 fs/kernfs/inode.c:192
5 locks held by syz-executor.3/11045:
2 locks held by syz-executor.4/11062:
 #0: ffffffff8e664088 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:75 [inline]
 #0: ffffffff8e664088 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x773/0xec0 net/core/rtnetlink.c:6138
 #1: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_add_one+0x94/0x560 fs/kernfs/dir.c:754
1 lock held by syz-executor.1/11068:
 #0: ffff888012873948 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_permission+0xaa/0x350 fs/kernfs/inode.c:288

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e3/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x19b/0x3e0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xcd5/0xd20 kernel/hung_task.c:377
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 11011 Comm: syz-executor.1 Not tainted 6.1.0-syzkaller-14594-g72a85e2b0a1e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:separate_irq_context kernel/locking/lockdep.c:4584 [inline]
RIP: 0010:__lock_acquire+0xdb4/0x1f60 kernel/locking/lockdep.c:5039
Code: 8b 18 48 85 db 74 54 83 fb 31 0f 83 30 10 00 00 48 8d 04 9b 48 8b 0c 24 48 8d 9c c1 30 0a 00 00 48 89 d8 48 c1 e8 03 8a 04 38 <84> c0 0f 85 93 0c 00 00 8b 1b 48 8b 44 24 18 8a 04 38 84 c0 0f 85
RSP: 0000:ffffc9001591f008 EFLAGS: 00000806
RAX: 1ffff110053fd800 RBX: ffff888029fec500 RCX: ffff888029feba80
RDX: 0000000000000000 RSI: 0000000000000008 RDI: dffffc0000000000
RBP: 0000000000000000 R08: dffffc0000000000 R09: fffffbfff212e046
R10: fffffbfff212e046 R11: 1ffffffff212e045 R12: 1ffff110053fd895
R13: 462f3e808d0b97b9 R14: ffff888029fec4a8 R15: ffff888029fec528
FS:  00007f4609d2f700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c00aac5000 CR3: 000000007c5dd000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
 rwsem_down_write_slowpath+0xbb8/0x14a0 kernel/locking/rwsem.c:1194
 __down_write_common kernel/locking/rwsem.c:1305 [inline]
 __down_write kernel/locking/rwsem.c:1314 [inline]
 down_write+0x231/0x270 kernel/locking/rwsem.c:1563
 kernfs_remove_by_name_ns+0x76/0x150 fs/kernfs/dir.c:1657
 kernfs_remove_by_name include/linux/kernfs.h:618 [inline]
 remove_files fs/sysfs/group.c:28 [inline]
 sysfs_remove_group+0x102/0x2b0 fs/sysfs/group.c:288
 sysfs_remove_groups+0x5b/0xb0 fs/sysfs/group.c:312
 destroy_gid_attrs drivers/infiniband/core/sysfs.c:1189 [inline]
 ib_free_port_attrs+0xbc/0x400 drivers/infiniband/core/sysfs.c:1414
 remove_one_compat_dev drivers/infiniband/core/device.c:1002 [inline]
 rdma_dev_exit_net+0x1f1/0x360 drivers/infiniband/core/device.c:1140
 ops_exit_list net/core/net_namespace.c:169 [inline]
 setup_net+0xa0d/0xd80 net/core/net_namespace.c:356
 copy_net_ns+0x34c/0x5a0 net/core/net_namespace.c:483
 create_new_namespaces+0x4db/0x8e0 kernel/nsproxy.c:110
 copy_namespaces+0x34b/0x3c0 kernel/nsproxy.c:179
 copy_process+0x1937/0x3ec0 kernel/fork.c:2269
 kernel_clone+0x227/0x640 kernel/fork.c:2681
 __do_sys_clone3 kernel/fork.c:2980 [inline]
 __se_sys_clone3+0x372/0x410 kernel/fork.c:2964
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f460908c0a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4609d2f038 EFLAGS: 00000246 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007f46091ac120 RCX: 00007f460908c0a9
RDX: 0000000000000000 RSI: 0000000000000058 RDI: 00007f4609d2f050
RBP: 00007f46090e7ae9 R08: 0000000000000000 R09: 0000000000000058
R10: 00007f4609d2f050 R11: 0000000000000246 R12: 0000000000000058
R13: 00007ffe5d8fd6af R14: 00007f4609d2f300 R15: 0000000000022000
 </TASK>

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/24 18:40 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in kernfs_iop_permission
2022/12/10 16:44 upstream 3ecc37918c80 67be1ae7 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in kernfs_iop_permission
2022/12/06 09:14 upstream bce9332220bd 045cbb84 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in kernfs_iop_permission
2022/12/01 12:16 upstream ef4d3ea40565 4c2a66e8 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in kernfs_iop_permission
2022/11/30 10:25 linux-next 9e46a7996732 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in kernfs_iop_permission
2023/02/12 13:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2d3827b3f393 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in kernfs_iop_permission
* Struck through repros no longer work on HEAD.