syzbot


INFO: task hung in tun_chr_close (4)

Status: auto-closed as invalid on 2022/09/18 21:51
Subsystems: net
[Documentation on labels]
First crash: 1200d, last: 1126d
Cause bisection: introduced by (bisect log) [no-op commit]:
commit 603607e70e3626e6ceb3ddec86e2a060c6cd6191
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Mon Aug 16 11:59:49 2021 +0000

  gpio: mlxbf2: Drop wrong use of ACPI_PTR()

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: syz .config
  
Fix bisection: failed (error log, bisect log)
  
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in tun_chr_close 40 28d 270d 0/3 upstream: reported on 2024/03/18 08:54
linux-4.19 INFO: task hung in tun_chr_close 1 1585d 1585d 0/1 auto-closed as invalid on 2020/12/09 18:55
upstream INFO: task hung in tun_chr_close (5) net syz 533 10h17m 89d 0/28 upstream: reported syz repro on 2024/09/15 19:59
upstream INFO: task hung in tun_chr_close net 5 1911d 2493d 0/28 closed as dup on 2018/02/16 08:24
linux-4.19 INFO: task hung in tun_chr_close (3) 1 862d 862d 0/1 auto-obsoleted due to no activity on 2022/12/03 04:48
linux-6.1 INFO: task hung in tun_chr_close 31 140d 207d 0/3 auto-obsoleted due to no activity on 2024/10/04 23:47
upstream INFO: task hung in rtnetlink_rcv_msg net C inconclusive inconclusive 1970 158d 2121d 26/28 fixed on 2024/07/09 19:14
android-49 INFO: task hung in tun_chr_close 1 2407d 2407d 0/3 auto-closed as invalid on 2019/02/22 14:33
linux-4.19 INFO: task hung in tun_chr_close (4) 3 668d 696d 0/1 upstream: reported on 2023/01/18 07:05
linux-4.19 INFO: task hung in tun_chr_close (2) 6 1074d 1168d 0/1 auto-closed as invalid on 2022/05/04 09:03
upstream INFO: task hung in tun_chr_close (3) net 1 1298d 1298d 0/28 auto-closed as invalid on 2021/08/23 13:06
android-44 INFO: task hung in tun_chr_close 1 2416d 2416d 0/2 auto-closed as invalid on 2019/02/22 15:23
upstream INFO: task hung in tun_chr_close (2) net 7 1407d 1628d 0/28 auto-closed as invalid on 2021/05/17 11:47
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/09/18 20:29 16m retest repro upstream OK log

Sample crash report:
INFO: task syz-executor.2:8850 blocked for more than 143 seconds.
      Not tainted 5.15.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:27664 pid: 8850 ppid:  6579 flags:0x00004006
Call Trace:
 context_switch kernel/sched/core.c:4940 [inline]
 __schedule+0x940/0x26f0 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
 tun_detach drivers/net/tun.c:684 [inline]
 tun_chr_close+0x3a/0x180 drivers/net/tun.c:3397
 __fput+0x288/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xbae/0x2a30 kernel/exit.c:825
 do_group_exit+0x125/0x310 kernel/exit.c:922
 get_signal+0x47f/0x2160 kernel/signal.c:2868
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x41940b
RSP: 002b:00007ffe6295b650 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 000000000041940b
RDX: 00000000005708b0 RSI: 0000000000000001 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2e920118
R10: 00007ffe6295b740 R11: 0000000000000293 R12: 000000000019faf5
R13: 00000000000003e8 R14: 000000000056bf80 R15: 000000000019f8c9

Showing all locks held in the system:
1 lock held by rcu_preempt/14:
 #0: ffff8880b9c31a58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:474 [inline]
 #0: ffff8880b9c31a58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock kernel/sched/sched.h:1317 [inline]
 #0: ffff8880b9c31a58 (&rq->__lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1620 [inline]
 #0: ffff8880b9c31a58 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0x236/0x26f0 kernel/sched/core.c:6201
1 lock held by khungtaskd/27:
 #0: ffffffff8b97fe20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6446
1 lock held by systemd-journal/2951:
1 lock held by in:imklog/6383:
 #0: ffff88807350f770 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
3 locks held by kworker/0:1/6538:
 #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: ffffc90002d6fdb0 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: switchdev_deferred_process_work+0xa/0x20 net/switchdev/switchdev.c:74
4 locks held by kworker/u4:1/6542:
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff8881401c3138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc90000ca7db0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0d03d0 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x9b/0xb00 net/core/net_namespace.c:553
 #3: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: netdev_run_todo+0x6fa/0xa80 net/core/dev.c:10594
3 locks held by kworker/1:5/8539:
 #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: ffffc9000c5c7db0 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xb/0x60 net/core/link_watch.c:251
3 locks held by kworker/1:6/8547:
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:634 [inline]
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:661 [inline]
 #0: ffff888024d3ad38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x8a3/0x16b0 kernel/workqueue.c:2268
 #1: ffffc9000c637db0 ((addr_chk_work).work){+.+.}-{0:0}, at: process_one_work+0x8d7/0x16b0 kernel/workqueue.c:2272
 #2: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_verify_work+0xa/0x20 net/ipv6/addrconf.c:4590
1 lock held by syz-executor.4/8840:
1 lock held by syz-executor.2/8850:
 #0: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:684 [inline]
 #0: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3a/0x180 drivers/net/tun.c:3397
1 lock held by syz-executor.0/8893:
 #0: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:684 [inline]
 #0: ffffffff8d0e3968 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3a/0x180 drivers/net/tun.c:3397
3 locks held by kworker/u4:5/9131:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.0-rc1-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: 6384 Comm: rs:main Q:Reg Not tainted 5.15.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:core_kernel_text kernel/extable.c:75 [inline]
RIP: 0010:kernel_text_address+0x11/0xf0 kernel/extable.c:125
Code: 60 8b 72 0c 31 c0 48 81 ff 80 5b 70 8d 0f 92 c0 c3 0f 1f 84 00 00 00 00 00 55 48 89 fd 48 83 ec 08 48 81 ff 00 00 00 81 72 09 <48> 81 ff 68 87 60 89 72 4c 48 c7 c0 44 1d 6e 8d 48 ba 00 00 00 00
RSP: 0018:ffffc9000bc77318 EFLAGS: 00000202
RAX: dffffc0000000000 RBX: ffffffff81bd4215 RCX: 0000000000000000
RDX: 1ffff9200178ee74 RSI: ffffc9000bc77770 RDI: ffffffff81bd4215
RBP: ffffffff81bd4215 R08: ffffffff8df42134 R09: 0000000000000001
R10: fffff5200178ee76 R11: 0000000000086089 R12: ffffc9000bc77410
R13: 0000000000000000 R14: ffff888076ba8000 R15: 000001c9f8bac60f
FS:  00007fb8a2dfa700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa959b03000 CR3: 0000000070573000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __kernel_text_address+0x9/0x30 kernel/extable.c:105
 unwind_get_return_address arch/x86/kernel/unwind_orc.c:318 [inline]
 unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:313
 arch_stack_walk+0x93/0xe0 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:121
 save_stack+0x151/0x1e0 mm/page_owner.c:119
 __reset_page_owner+0x5d/0x170 mm/page_owner.c:140
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1338 [inline]
 free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389
 free_unref_page_prepare mm/page_alloc.c:3315 [inline]
 free_unref_page+0x19/0x690 mm/page_alloc.c:3394
 __unfreeze_partials+0x340/0x360 mm/slub.c:2495
 qlink_free mm/kasan/quarantine.c:146 [inline]
 qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165
 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272
 __kasan_slab_alloc+0x95/0xb0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook mm/slab.h:519 [inline]
 slab_alloc_node mm/slub.c:3206 [inline]
 slab_alloc mm/slub.c:3214 [inline]
 kmem_cache_alloc+0x209/0x390 mm/slub.c:3219
 kmem_cache_zalloc include/linux/slab.h:711 [inline]
 alloc_buffer_head+0x20/0x140 fs/buffer.c:3305
 alloc_page_buffers+0x28a/0x770 fs/buffer.c:832
 create_empty_buffers+0x2c/0x840 fs/buffer.c:1556
 ext4_block_write_begin+0xcf2/0x1110 fs/ext4/inode.c:1060
 ext4_da_write_begin+0x3d8/0x11c0 fs/ext4/inode.c:3021
 generic_perform_write+0x202/0x510 mm/filemap.c:3770
 ext4_buffered_write_iter+0x244/0x500 fs/ext4/file.c:269
 ext4_file_write_iter+0x423/0x14e0 fs/ext4/file.c:680
 call_write_iter include/linux/fs.h:2163 [inline]
 new_sync_write+0x40b/0x640 fs/read_write.c:507
 vfs_write+0x7cf/0xae0 fs/read_write.c:594
 ksys_write+0x12d/0x250 fs/read_write.c:647
 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:0x7fb8a583e1cd
Code: c2 20 00 00 75 10 b8 01 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ae fc ff ff 48 89 04 24 b8 01 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 f7 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007fb8a2df9590 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fb898025200 RCX: 00007fb8a583e1cd
RDX: 0000000000000519 RSI: 00007fb898025200 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00007fb898024f80
R13: 00007fb8a2df95b0 R14: 0000564ff9c33440 R15: 0000000000000519
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	8b 72 0c             	mov    0xc(%rdx),%esi
   3:	31 c0                	xor    %eax,%eax
   5:	48 81 ff 80 5b 70 8d 	cmp    $0xffffffff8d705b80,%rdi
   c:	0f 92 c0             	setb   %al
   f:	c3                   	retq
  10:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
  17:	00
  18:	55                   	push   %rbp
  19:	48 89 fd             	mov    %rdi,%rbp
  1c:	48 83 ec 08          	sub    $0x8,%rsp
  20:	48 81 ff 00 00 00 81 	cmp    $0xffffffff81000000,%rdi
  27:	72 09                	jb     0x32
* 29:	48 81 ff 68 87 60 89 	cmp    $0xffffffff89608768,%rdi <-- trapping instruction
  30:	72 4c                	jb     0x7e
  32:	48 c7 c0 44 1d 6e 8d 	mov    $0xffffffff8d6e1d44,%rax
  39:	48                   	rex.W
  3a:	ba 00 00 00 00       	mov    $0x0,%edx

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/13 18:50 upstream 6880fa6c5660 3ce60af8 .config console log report syz ci-upstream-kasan-gce INFO: task hung in tun_chr_close
2021/11/13 08:54 upstream 7246f4dcaccc 83f5c9b5 .config console log report info ci-upstream-kasan-gce INFO: task hung in tun_chr_close
2021/09/29 07:08 upstream a4e6f95a891a d82cb927 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in tun_chr_close
2021/09/23 14:46 upstream 58e2cf5d7946 8cac236e .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in tun_chr_close
2021/09/14 13:08 upstream d0ee23f9d78b 58d09404 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in tun_chr_close
2021/09/26 22:03 upstream 996148ee05d0 78494d16 .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tun_chr_close
2021/09/25 11:25 upstream 7d42e9818258 8cac236e .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tun_chr_close
2021/08/31 12:05 upstream b91db6a0b52e 8f58a0ef .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in tun_chr_close
2021/09/19 13:48 net-old 87758511075e 70b76c1d .config console log report info ci-upstream-net-this-kasan-gce INFO: task hung in tun_chr_close
2021/10/19 23:22 net-next-old cb3dc8901ba4 466b7db1 .config console log report info ci-upstream-net-kasan-gce INFO: task hung in tun_chr_close
2021/10/19 13:33 net-next-old cb3dc8901ba4 24dc29db .config console log report info ci-upstream-net-kasan-gce INFO: task hung in tun_chr_close
2021/10/18 23:44 net-next-old f616447034a1 24dc29db .config console log report info ci-upstream-net-kasan-gce INFO: task hung in tun_chr_close
2021/10/18 12:55 net-next-old d40dfa0cebd8 0c5d9412 .config console log report info ci-upstream-net-kasan-gce INFO: task hung in tun_chr_close
2021/10/20 10:11 linux-next 51dba6e335ff 418a00eb .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in tun_chr_close
* Struck through repros no longer work on HEAD.