the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 3258 Comm: syz-executor1 Not tainted 4.14.0-rc7-next-20171103+ #10 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 register_lock_class+0x55e/0x2c70 kernel/locking/lockdep.c:781 __lock_acquire+0x203/0x4770 kernel/locking/lockdep.c:3387 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:174 spin_lock_bh include/linux/spinlock.h:320 [inline] tcp_fastopen_reset_cipher+0x194/0x580 net/ipv4/tcp_fastopen.c:98 do_tcp_setsockopt.isra.37+0x24d/0x21b0 net/ipv4/tcp.c:2589 tcp_setsockopt+0xb0/0xd0 net/ipv4/tcp.c:2879 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2965 SYSC_setsockopt net/socket.c:1851 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1830 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x447c89 RSP: 002b:00007f6056cf1bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f6056cf26cc RCX: 0000000000447c89 RDX: 0000000000000021 RSI: 0000000000000006 RDI: 0000000000000013 RBP: 0000000000000086 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020f2b000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000008640 R14: 00000000006ec6e0 R15: 00007f6056cf2700 raw_sendmsg: syz-executor7 forgot to set AF_INET. Fix it! sctp: [Deprecated]: syz-executor6 (pid 3295) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor6 (pid 3295) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead mmap: syz-executor4 (3316) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. QAT: Invalid ioctl audit: type=1326 audit(1510156747.236:2): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=3361 comm="syz-executor1" exe="/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x447c89 code=0xffff0000 QAT: Invalid ioctl audit: type=1326 audit(1510156747.335:3): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=3361 comm="syz-executor1" exe="/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x447c89 code=0xffff0000 sg_write: data in/out 3171656/2 bytes for SCSI command 0xff-- guessing data in; program syz-executor5 not setting count and/or reply_len properly netlink: 5 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor1'.