syzbot


INFO: task hung in add_one_compat_dev

Status: auto-closed as invalid on 2022/01/16 14:52
Subsystems: rdma
[Documentation on labels]
First crash: 1064d, last: 1064d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in add_one_compat_dev (2) rdma 7 444d 600d 0/28 auto-obsoleted due to no activity on 2023/09/27 22:12
linux-5.15 INFO: task hung in add_one_compat_dev 1 480d 480d 0/3 auto-obsoleted due to no activity on 2023/09/02 14:33

Sample crash report:
INFO: task syz-executor.2:12094 blocked for more than 143 seconds.
      Not tainted 5.15.0-rc5-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:27816 pid:12094 ppid:  6591 flags:0x00004004
Call Trace:
 context_switch kernel/sched/core.c:4940 [inline]
 __schedule+0xb44/0x5960 kernel/sched/core.c:6287
 schedule+0xd3/0x270 kernel/sched/core.c:6366
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6425
 __mutex_lock_common kernel/locking/mutex.c:669 [inline]
 __mutex_lock+0xa34/0x12f0 kernel/locking/mutex.c:729
 add_one_compat_dev+0xea/0x800 drivers/infiniband/core/device.c:942
 rdma_dev_init_net+0x28b/0x480 drivers/infiniband/core/device.c:1184
 ops_init+0xaf/0x470 net/core/net_namespace.c:140
 setup_net+0x40f/0xa30 net/core/net_namespace.c:326
 copy_net_ns+0x319/0x760 net/core/net_namespace.c:470
 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:226
 ksys_unshare+0x445/0x920 kernel/fork.c:3077
 __do_sys_unshare kernel/fork.c:3151 [inline]
 __se_sys_unshare kernel/fork.c:3149 [inline]
 __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3149
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f74f231ba39
RSP: 002b:00007f74ef7ec188 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f74f241f320 RCX: 00007f74f231ba39
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000060000000
RBP: 00007f74f2375c5f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffef3426fdf R14: 00007f74ef7ec300 R15: 0000000000022000

Showing all locks held in the system:
4 locks held by kworker/u4:0/8:
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888140173138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc90000cd7db0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0d5750 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x9b/0xb00 net/core/net_namespace.c:555
 #3: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: tc_action_net_exit include/net/act_api.h:155 [inline]
 #3: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: gate_exit_net+0x22/0x370 net/sched/act_gate.c:624
1 lock held by khungtaskd/26:
 #0: ffffffff8b981ee0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6446
1 lock held by in:imklog/6258:
 #0: ffff8880731a39f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
3 locks held by kworker/0:7/8256:
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888010c64d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc9000b7c7db0 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: switchdev_deferred_process_work+0xa/0x20 net/switchdev/switchdev.c:74
3 locks held by kworker/0:11/11641:
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc9000c4afdb0 ((reg_check_chans).work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: reg_check_chans_work+0x83/0xe10 net/wireless/reg.c:2423
3 locks held by kworker/0:13/11643:
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888147c52d38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc9000c4cfdb0 ((addr_chk_work).work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_verify_work+0xa/0x20 net/ipv6/addrconf.c:4590
2 locks held by syz-executor.2/12079:
 #0: ffffffff8d0d5750 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2f5/0x760 net/core/net_namespace.c:466
 #1: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: ip_tunnel_init_net+0x2d5/0x9d0 net/ipv4/ip_tunnel.c:1069
6 locks held by syz-executor.2/12088:
 #0: ffffffff8d0d5750 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2f5/0x760 net/core/net_namespace.c:466
 #1: ffffffff8ce018d0 (devices_rwsem){++++}-{3:3}, at: rdma_dev_init_net+0x20d/0x480 drivers/infiniband/core/device.c:1178
 #2: ffffffff8ce01650 (rdma_nets_rwsem){++++}-{3:3}, at: rdma_dev_init_net+0x280/0x480 drivers/infiniband/core/device.c:1183
 #3: ffff88802d5f8fe0 (&device->compat_devs_mutex){+.+.}-{3:3}, at: add_one_compat_dev+0xea/0x800 drivers/infiniband/core/device.c:942
 #4: ffff88802d5f9208 (&rxe->usdev_lock){+.+.}-{3:3}, at: rxe_query_port+0x129/0x2d0 drivers/infiniband/sw/rxe/rxe_verbs.c:40
 #5: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: ib_get_eth_speed+0xfe/0x5f0 drivers/infiniband/core/verbs.c:1900
4 locks held by syz-executor.2/12094:
 #0: ffffffff8d0d5750 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2f5/0x760 net/core/net_namespace.c:466
 #1: ffffffff8ce018d0 (devices_rwsem){++++}-{3:3}, at: rdma_dev_init_net+0x20d/0x480 drivers/infiniband/core/device.c:1178
 #2: ffffffff8ce01650 (rdma_nets_rwsem){++++}-{3:3}, at: rdma_dev_init_net+0x280/0x480 drivers/infiniband/core/device.c:1183
 #3: ffff88802d5f8fe0 (&device->compat_devs_mutex){+.+.}-{3:3}, at: add_one_compat_dev+0xea/0x800 drivers/infiniband/core/device.c:942
1 lock held by syz-executor.2/12148:
 #0: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3be/0xb80 net/core/rtnetlink.c:5569
1 lock held by syz-executor.2/12151:
 #0: ffffffff8d0e8ea8 (rtnl_mutex){+.+.}-{3:3}, at: __tun_chr_ioctl.isra.0+0x1a5/0x4230 drivers/net/tun.c:3011

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

NMI backtrace for cpu 0
CPU: 0 PID: 26 Comm: khungtaskd Not tainted 5.15.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 149 Comm: kworker/u4:2 Not tainted 5.15.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: phy3 ieee80211_iface_work
RIP: 0010:check_kcov_mode+0xf/0x40 kernel/kcov.c:163
Code: 7c 24 08 e8 73 7b 47 00 e9 61 fd ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 65 8b 05 b9 12 8b 7e 89 c2 81 e2 00 01 00 00 <a9> 00 01 ff 00 74 10 31 c0 85 d2 74 15 8b 96 64 15 00 00 85 d2 74
RSP: 0018:ffffc9000179f2c8 EFLAGS: 00000046
RAX: 0000000080000001 RBX: ffffffff902beda8 RCX: ffff88823bdb9000
RDX: 0000000000000000 RSI: ffff888017839c80 RDI: 0000000000000003
RBP: ffff88823bdb9000 R08: ffff88823bdb8aa4 R09: ffffffff8ef0504f
R10: ffffffff81be8b90 R11: 0000000000000001 R12: ffff888010c41640
R13: 0000000000000028 R14: ffff88823bdb8aa4 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdbcea2e000 CR3: 000000000b68e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 write_comp_data kernel/kcov.c:218 [inline]
 __sanitizer_cov_trace_cmp8+0x1d/0x70 kernel/kcov.c:264
 for_each_canary mm/kfence/core.c:254 [inline]
 kfence_guarded_alloc mm/kfence/core.c:321 [inline]
 __kfence_alloc+0x710/0xca0 mm/kfence/core.c:779
 kfence_alloc include/linux/kfence.h:124 [inline]
 slab_alloc_node mm/slub.c:3124 [inline]
 slab_alloc mm/slub.c:3214 [inline]
 __kmalloc+0x21c/0x320 mm/slub.c:4387
 kmalloc include/linux/slab.h:596 [inline]
 ieee802_11_parse_elems_crc+0x121/0xfe0 net/mac80211/util.c:1477
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2207 [inline]
 ieee80211_rx_mgmt_probe_beacon+0x187/0x17c0 net/mac80211/ibss.c:1605
 ieee80211_ibss_rx_queued_mgmt+0xd37/0x1610 net/mac80211/ibss.c:1635
 ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline]
 ieee80211_iface_work+0xa65/0xd00 net/mac80211/iface.c:1493
 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	24 08                	and    $0x8,%al
   2:	e8 73 7b 47 00       	callq  0x477b7a
   7:	e9 61 fd ff ff       	jmpq   0xfffffd6d
   c:	cc                   	int3
   d:	cc                   	int3
   e:	cc                   	int3
   f:	cc                   	int3
  10:	cc                   	int3
  11:	cc                   	int3
  12:	cc                   	int3
  13:	cc                   	int3
  14:	cc                   	int3
  15:	cc                   	int3
  16:	cc                   	int3
  17:	cc                   	int3
  18:	cc                   	int3
  19:	cc                   	int3
  1a:	65 8b 05 b9 12 8b 7e 	mov    %gs:0x7e8b12b9(%rip),%eax        # 0x7e8b12da
  21:	89 c2                	mov    %eax,%edx
  23:	81 e2 00 01 00 00    	and    $0x100,%edx
* 29:	a9 00 01 ff 00       	test   $0xff0100,%eax <-- trapping instruction
  2e:	74 10                	je     0x40
  30:	31 c0                	xor    %eax,%eax
  32:	85 d2                	test   %edx,%edx
  34:	74 15                	je     0x4b
  36:	8b 96 64 15 00 00    	mov    0x1564(%rsi),%edx
  3c:	85 d2                	test   %edx,%edx
  3e:	74                   	.byte 0x74

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/18 14:43 net-next-old d40dfa0cebd8 0c5d9412 .config console log report info ci-upstream-net-kasan-gce INFO: task hung in add_one_compat_dev
* Struck through repros no longer work on HEAD.