Subject: WARNING in xfrm_state_fini

From: syzbot <[email-masked]>
Date: Tue, 21 Nov 2017 02:00:01 -0800

Hello,

syzkaller hit the following crash on  
c8a0739b185d11d6e2ca7ad9f5835841d1cfc765
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
C reproducer is attached
syzkaller reproducer is attached. See https://goo.gl/kgGztJ
for information about syzkaller reproducers

Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 21 Comm: kworker/u4:1 Not tainted 4.14.0+ #187
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
  __dump_stack lib/dump_stack.c:17 [inline]
  dump_stack+0x194/0x257 lib/dump_stack.c:53
  panic+0x1e4/0x41c kernel/panic.c:183
  __warn+0x1dc/0x200 kernel/panic.c:547
  report_bug+0x211/0x2d0 lib/bug.c:184
  fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:177
  fixup_bug arch/x86/kernel/traps.c:246 [inline]
  do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:295
  do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
  invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:926
RIP: 0010:xfrm_state_fini+0x46a/0x620 net/xfrm/xfrm_state.c:2323
RSP: 0018:ffff8801d9ce70f0 EFLAGS: 00010293
RAX: ffff8801d9cde580 RBX: ffff8801ccf50040 RCX: ffffffff845cb0fa
RDX: 0000000000000000 RSI: 1ffff1003b39bdd1 RDI: ffffed003b39ce10
RBP: ffff8801d9ce7248 R08: 1ffff1003b39cda4 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1003b39ce20
R13: ffff8801d9ce7220 R14: 1ffff1003b39ce24 R15: ffff8801ccf51500
  xfrm_net_exit+0x25/0x30 net/xfrm/xfrm_policy.c:2957
  ops_exit_list.isra.6+0xae/0x150 net/core/net_namespace.c:142
  cleanup_net+0x5c7/0xb60 net/core/net_namespace.c:484
  process_one_work+0xbfd/0x1be0 kernel/workqueue.c:2112
  worker_thread+0x223/0x1990 kernel/workqueue.c:2246
  kthread+0x37a/0x440 kernel/kthread.c:238
  ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:437
Dumping ftrace buffer:
    (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to [email-masked].
Please credit me with: Reported-by: syzbot <[email-masked]>

syzbot will keep track of this bug report.
Once a fix for this bug is committed, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug  
report.
Note: all commands must start from beginning of the line in the email body.