syzbot


WARNING in free_kthread_struct

Status: fixed on 2017/11/28 03:36
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+28a52b4b1430f7b2e8ced22340031dab2a0e728a@syzkaller.appspotmail.com
Fix commit: e10237cc76ef kthread: zero the kthread data structure
First crash: 2563d, last: 2518d

Sample crash report:
WARNING: CPU: 0 PID: 6115 at kernel/kthread.c:87 free_kthread_struct+0xa2/0xe0 kernel/kthread.c:87
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 6115 Comm: modprobe Not tainted 4.14.0-rc5-mm1+ #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:52
 panic+0x1e4/0x41c kernel/panic.c:183
 __warn+0x1c4/0x1e0 kernel/panic.c:546
 report_bug+0x211/0x2d0 lib/bug.c:183
 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:177
 do_trap_no_signal arch/x86/kernel/traps.c:211 [inline]
 do_trap+0x260/0x390 arch/x86/kernel/traps.c:260
 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:297
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:310
 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:905
RIP: 0010:free_kthread_struct+0xa2/0xe0 kernel/kthread.c:87
RSP: 0018:ffff8801db207768 EFLAGS: 00010206
RAX: ffff8801c27142c0 RBX: ffff8801c556af00 RCX: ffffffff8148d7e2
RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff8801c556afb8
RBP: ffff8801db207770 R08: 0000000000000001 R09: 1ffff1003b640edc
R10: ffff8801db2076a8 R11: 0000000000000002 R12: 1ffff1003b640ef0
R13: 1ffff1003b640ef4 R14: 0000000000000000 R15: ffff8801db2077e0
 free_task+0x134/0x1a0 kernel/fork.c:390
 __put_task_struct+0x229/0x3b0 kernel/fork.c:668
 put_task_struct include/linux/sched/task.h:95 [inline]
 delayed_put_task_struct+0xca/0x3d0 kernel/exit.c:180
 __rcu_reclaim kernel/rcu/rcu.h:172 [inline]
 rcu_do_batch kernel/rcu/tree.c:2676 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2897 [inline]
 rcu_process_callbacks+0xd74/0x17d0 kernel/rcu/tree.c:2914
 __do_softirq+0x2d7/0xb85 kernel/softirq.c:284
 invoke_softirq kernel/softirq.c:364 [inline]
 irq_exit+0x1cc/0x200 kernel/softirq.c:405
 exiting_irq arch/x86/include/asm/apic.h:540 [inline]
 smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1052
 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:770
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:777 [inline]
RIP: 0010:lock_acquire+0x256/0x580 kernel/locking/lockdep.c:3994
RSP: 0018:ffff8801c2937140 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff11
RAX: dffffc0000000000 RBX: ffff8801c27142c0 RCX: 0000000000000000
RDX: 1ffffffff0b58f39 RSI: 00000000a7a0a48d RDI: 0000000000000282
RBP: ffff8801c2937238 R08: ffffffff8197e6fd R09: 0000000000000004
R10: ffff8801c2937120 R11: 0000000000000002 R12: 1ffff10038526e2e
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:149
 spin_lock include/linux/spinlock.h:314 [inline]
 zap_pte_range mm/memory.c:1295 [inline]
 zap_pmd_range mm/memory.c:1438 [inline]
 zap_pud_range mm/memory.c:1467 [inline]
 zap_p4d_range mm/memory.c:1488 [inline]
 unmap_page_range+0xc5d/0x22e0 mm/memory.c:1509
 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1554
 unmap_vmas+0xf1/0x1b0 mm/memory.c:1584
 exit_mmap+0x232/0x530 mm/mmap.c:3003
 __mmput kernel/fork.c:971 [inline]
 mmput+0x223/0x6c0 kernel/fork.c:992
 exit_mm kernel/exit.c:544 [inline]
 do_exit+0x904/0x1ad0 kernel/exit.c:856
 do_group_exit+0x149/0x400 kernel/exit.c:972
 SYSC_exit_group kernel/exit.c:983 [inline]
 SyS_exit_group+0x1d/0x20 kernel/exit.c:981
 entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x7fa20bc591e8
RSP: 002b:00007ffdce4fde88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fa20bc591e8
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffa8
R10: 00007fa20bf34740 R11: 0000000000000246 R12: 00005583d465f090
R13: 00007ffdce4fcbc0 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (136405):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/11/07 11:06 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz C ci-upstream-mmots-kasan-gce
2017/11/07 10:25 linux-next 5a3517e009e9 e0a2b195 .config console log report syz C ci-upstream-next-kasan-gce
2017/11/07 10:20 linux-next 5a3517e009e9 e0a2b195 .config console log report syz C ci-upstream-next-kasan-gce
2017/11/05 04:52 linux-next 5a3517e009e9 e0a2b195 .config console log report syz C ci-upstream-next-kasan-gce
2017/11/03 15:28 linux-next 5a3517e009e9 e0a2b195 .config console log report syz C skylake-linux-next-kasan-qemu
2017/11/03 15:17 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz C ci-upstream-mmots-kasan-gce
2017/11/02 16:37 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz C ci-upstream-mmots-kasan-gce
2017/11/02 16:29 linux-next fa8785e862ef 02b8363d .config console log report syz C skylake-linux-next-kasan-qemu
2017/11/02 16:24 linux-next fa8785e862ef 02b8363d .config console log report syz C skylake-linux-next-kasan-qemu
2017/09/27 08:25 linux-next 045c5205823f c26ea367 .config console log report syz C ci-upstream-next-kasan-gce
2017/11/05 04:51 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz ci-upstream-mmots-kasan-gce
2017/11/05 04:35 linux-next 5a3517e009e9 e0a2b195 .config console log report syz ci-upstream-next-kasan-gce
2017/11/04 08:04 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz ci-upstream-mmots-kasan-gce
2017/11/04 08:02 linux-next 5a3517e009e9 e0a2b195 .config console log report syz skylake-linux-next-kasan-qemu
2017/11/04 07:35 linux-next 5a3517e009e9 e0a2b195 .config console log report syz skylake-linux-next-kasan-qemu
2017/11/03 14:51 linux-next 5a3517e009e9 e0a2b195 .config console log report syz skylake-linux-next-kasan-qemu
2017/11/02 12:29 mmots 0f611fb6dcc0 e0a2b195 .config console log report syz ci-upstream-mmots-kasan-gce
2017/11/02 12:17 linux-next fa8785e862ef 02b8363d .config console log report syz skylake-linux-next-kasan-qemu
2017/11/02 12:02 linux-next fa8785e862ef 02b8363d .config console log report syz skylake-linux-next-kasan-qemu
2017/09/29 03:30 mmots 8fd0520d9cec c26ea367 .config console log report syz ci-upstream-mmots-kasan-gce
2017/09/27 07:33 linux-next 045c5205823f c26ea367 .config console log report syz ci-upstream-next-kasan-gce
2017/11/09 03:38 linux-next 5a3517e009e9 e0a2b195 .config console log report ci-upstream-next-kasan-gce
2017/11/05 00:47 linux-next 5a3517e009e9 e0a2b195 .config console log report ci-upstream-next-kasan-gce
2017/11/04 09:23 linux-next 5a3517e009e9 e0a2b195 .config console log report skylake-linux-next-kasan-qemu
2017/10/23 06:09 linux-next 36ef71cae353 e511d9f8 .config console log report ci-upstream-next-kasan-gce
2017/10/14 21:15 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/14 10:28 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/14 00:43 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/13 13:19 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/13 06:40 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/12 13:53 linux-next 49827b977a2e 441d64d9 .config console log report ci-upstream-next-kasan-gce
2017/10/08 02:36 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
2017/10/07 20:47 mmots fb686cb13e51 c26ea367 .config console log report ci-upstream-mmots-kasan-gce
2017/10/07 12:39 mmots fb686cb13e51 c26ea367 .config console log report ci-upstream-mmots-kasan-gce
2017/10/05 20:27 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
2017/10/05 05:12 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
2017/10/04 13:50 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
2017/10/04 05:37 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
2017/10/04 04:45 mmots af6dd9aabb86 c26ea367 .config console log report ci-upstream-mmots-kasan-gce
2017/10/01 04:51 mmots c0232cb3af70 c26ea367 .config console log report ci-upstream-mmots-kasan-gce
2017/09/29 23:36 linux-next 1418b852174a c26ea367 .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.