============================================ WARNING: possible recursive locking detected 4.13.0-rc6+ #34 Not tainted -------------------------------------------- syz-executor1/23482 is trying to acquire lock: (k-sk_lock-AF_KCM){+.+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] (k-sk_lock-AF_KCM){+.+.+.}, at: [] kcm_sendpage+0x16e/0x1880 net/kcm/kcmsock.c:774 but task is already holding lock: (k-sk_lock-AF_KCM){+.+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] (k-sk_lock-AF_KCM){+.+.+.}, at: [] kcm_sendpage+0x16e/0x1880 net/kcm/kcmsock.c:774 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(k-sk_lock-AF_KCM); lock(k-sk_lock-AF_KCM); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor1/23482: #0: (sk_lock-AF_KCM){+.+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] #0: (sk_lock-AF_KCM){+.+.+.}, at: [] kcm_sendmsg+0x1ec/0x2200 net/kcm/kcmsock.c:910 #1: (k-sk_lock-AF_KCM){+.+.+.}, at: [] lock_sock include/net/sock.h:1459 [inline] #1: (k-sk_lock-AF_KCM){+.+.+.}, at: [] kcm_sendpage+0x16e/0x1880 net/kcm/kcmsock.c:774 stack backtrace: CPU: 1 PID: 23482 Comm: syz-executor1 Not tainted 4.13.0-rc6+ #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_deadlock_bug kernel/locking/lockdep.c:1743 [inline] check_deadlock kernel/locking/lockdep.c:1787 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0xfac/0x3dc0 kernel/locking/lockdep.c:3367 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3855 lock_sock_nested+0xc2/0x110 net/core/sock.c:2762 lock_sock include/net/sock.h:1459 [inline] kcm_sendpage+0x16e/0x1880 net/kcm/kcmsock.c:774 kernel_sendpage+0x8d/0xe0 net/socket.c:3387 kcm_write_msgs+0x404/0x1b80 net/kcm/kcmsock.c:646 kcm_sendpage+0x10c0/0x1880 net/kcm/kcmsock.c:864 kernel_sendpage+0x8d/0xe0 net/socket.c:3387 kcm_write_msgs+0x404/0x1b80 net/kcm/kcmsock.c:646 kcm_sendmsg+0x1446/0x2200 net/kcm/kcmsock.c:1035 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x31a/0x5d0 net/socket.c:912 call_write_iter include/linux/fs.h:1743 [inline] new_sync_write fs/read_write.c:457 [inline] __vfs_write+0x684/0x970 fs/read_write.c:470 vfs_write+0x189/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x451e59 RSP: 002b:00007f1db3539c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 0000000000451e59 RDX: 000000000000009a RSI: 0000000020ef4000 RDI: 000000000000001d RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004ba2c9 R13: 0000000000a6f7ef R14: 00007f1db353a9c0 R15: 0000000000000000 device syz0 entered promiscuous mode FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 26772 Comm: syz-executor5 Not tainted 4.13.0-rc6+ #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2880 [inline] prepare_alloc_pages mm/page_alloc.c:4052 [inline] __alloc_pages_nodemask+0x330/0xd40 mm/page_alloc.c:4090 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:1974 alloc_pages include/linux/gfp.h:507 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2196 tun_build_skb.isra.42+0x13f/0x1450 drivers/net/tun.c:1283 tun_get_user+0x1daf/0x2150 drivers/net/tun.c:1441 tun_chr_write_iter+0xd8/0x190 drivers/net/tun.c:1565 call_write_iter include/linux/fs.h:1743 [inline] new_sync_write fs/read_write.c:457 [inline] __vfs_write+0x684/0x970 fs/read_write.c:470 vfs_write+0x189/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x40c2c1 RSP: 002b:00007f97c6f8ec10 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 000000000040c2c1 RDX: 000000000000003e RSI: 000000002000cfbc RDI: 0000000000000015 RBP: 00007f97c6f8ea10 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000f4240 R11: 0000000000000293 R12: 00000000004b69f7 R13: 00007f97c6f8eb48 R14: 00000000004b6a07 R15: 0000000000000000