bisecting fixing commit since 4b0e041c9dada60197efc1697928cd32c2c70cd2 building syzkaller on b0e8efcb4b0aac61f4647a76bbe54a5d38a370ba testing commit 4b0e041c9dada60197efc1697928cd32c2c70cd2 with gcc (GCC) 8.1.0 kernel signature: c12df7076399e2d12cc4c7dd29b71a55fa252a54cebfaf87c6b56fa5fbc7e595 all runs: crashed: kernel BUG at include/linux/mm.h:LINE! testing current HEAD 3fc898571b974f9a05e4e5c1fe17b18548207091 testing commit 3fc898571b974f9a05e4e5c1fe17b18548207091 with gcc (GCC) 8.1.0 kernel signature: de9841ad4ab50c22ebb143917cd59b4629705de942088160351425728052ec47 all runs: crashed: kernel BUG at include/linux/mm.h:LINE! revisions tested: 2, total time: 26m40.175031827s (build: 19m41.525138034s, test: 6m22.135501411s) the crash still happens on HEAD commit msg: Linux 4.19.128 crash: kernel BUG at include/linux/mm.h:LINE! raw: 01fffc0000000000 ffffea0002447c08 ffffea000218b208 0000000000000000 raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000 page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) ------------[ cut here ]------------ kernel BUG at include/linux/mm.h:519! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 7139 Comm: syz-executor.2 Not tainted 4.19.128-syzkaller #0 page:ffffea00020c6e00 count:0 mapcount:-128 mapping:0000000000000000 index:0x0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:put_page_testzero include/linux/mm.h:519 [inline] RIP: 0010:put_page include/linux/mm.h:961 [inline] RIP: 0010:__skb_frag_unref include/linux/skbuff.h:2816 [inline] RIP: 0010:skb_release_data+0x4a2/0x6c0 net/core/skbuff.c:568 Code: 88 63 03 48 8b 7d c8 e8 8c fe fe ff 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 c7 c6 c0 f7 71 87 4c 89 ff e8 1e df 76 fc <0f> 0b 48 8b 7d b0 e8 e3 ef 82 fc e9 8f fc ff ff e8 d9 ef 82 fc e9 RSP: 0018:ffff88809f297a30 EFLAGS: 00010246 flags: 0x1fffc0000000000() RAX: dffffc0000000000 RBX: ffff88809c32b080 RCX: 0000000000000000 RDX: 1ffffd4000440107 RSI: 0000000000000000 RDI: ffffea0002200838 RBP: ffff88809f297a90 R08: ffffed1015d65079 R09: ffffed1015d65078 R10: ffffed1015d65078 R11: ffff8880aeb283c7 R12: ffffea0002200834 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffea0002200800 FS: 00000000022b3940(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f20c2758000 CR3: 00000000867f3000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: skb_release_all+0x3d/0x50 net/core/skbuff.c:631 raw: 01fffc0000000000 ffffea00020c7208 ffff88812fffc878 0000000000000000 __kfree_skb+0xd/0x20 net/core/skbuff.c:645 sk_wmem_free_skb include/net/sock.h:1462 [inline] tcp_write_queue_purge+0x230/0x790 net/ipv4/tcp.c:2541 tcp_v4_destroy_sock+0x8a/0x690 net/ipv4/tcp_ipv4.c:1977 inet_csk_destroy_sock+0x126/0x3a0 net/ipv4/inet_connection_sock.c:863 raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000 tcp_close+0x83a/0xf30 net/ipv4/tcp.c:2496 page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) tls_sk_proto_close+0x541/0x8e0 net/tls/tls_main.c:312 ------------[ cut here ]------------ kernel BUG at include/linux/mm.h:519! inet_release+0xb9/0x1b0 net/ipv4/af_inet.c:427 __sock_release+0x1da/0x2a0 net/socket.c:579 sock_release+0xb/0x10 net/socket.c:599 smc_release+0x247/0x6d0 net/smc/af_smc.c:156 __sock_release+0xc7/0x2a0 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __fput+0x24c/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x10e/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x1a9/0x200 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x419/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4129e1 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 e4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffe99ab2590 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00000000004129e1 RDX: 0000001b31920000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000740550 R08: 000000000000bacc R09: 000000000000bacc R10: 00007ffe99ab2660 R11: 0000000000000293 R12: 0000000000000001 R13: 000000000000bb1b R14: 000000000000bb48 R15: 000000000073bf0c Modules linked in: invalid opcode: 0000 [#2] PREEMPT SMP KASAN ---[ end trace d25485acf3045b6f ]--- CPU: 0 PID: 7131 Comm: syz-executor.5 Tainted: G D 4.19.128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:put_page_testzero include/linux/mm.h:519 [inline] RIP: 0010:put_page include/linux/mm.h:961 [inline] RIP: 0010:__skb_frag_unref include/linux/skbuff.h:2816 [inline] RIP: 0010:skb_release_data+0x4a2/0x6c0 net/core/skbuff.c:568 RIP: 0010:put_page_testzero include/linux/mm.h:519 [inline] RIP: 0010:put_page include/linux/mm.h:961 [inline] RIP: 0010:__skb_frag_unref include/linux/skbuff.h:2816 [inline] RIP: 0010:skb_release_data+0x4a2/0x6c0 net/core/skbuff.c:568 Code: 88 63 03 48 8b 7d c8 e8 8c fe fe ff 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 c7 c6 c0 f7 71 87 4c 89 ff e8 1e df 76 fc <0f> 0b 48 8b 7d b0 e8 e3 ef 82 fc e9 8f fc ff ff e8 d9 ef 82 fc e9 RSP: 0018:ffff88809eff7a30 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88809b9d2c00 RCX: 0000000000000001 RDX: 1ffffd4000418dc7 RSI: 0000000000000000 RDI: ffffea00020c6e38 Code: 88 63 03 48 8b 7d c8 e8 8c fe fe ff 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 c7 c6 c0 f7 71 87 4c 89 ff e8 1e df 76 fc <0f> 0b 48 8b 7d b0 e8 e3 ef 82 fc e9 8f fc ff ff e8 d9 ef 82 fc e9 RBP: ffff88809eff7a90 R08: ffffed1015d45079 R09: ffffed1015d45078 RSP: 0018:ffff88809f297a30 EFLAGS: 00010246 R10: ffffed1015d45078 R11: ffff8880aea283c7 R12: ffffea00020c6e34 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffea00020c6e00 FS: 0000000001d12940(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020014000 CR3: 000000009ee21000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: RAX: dffffc0000000000 RBX: ffff88809c32b080 RCX: 0000000000000000 skb_release_all+0x3d/0x50 net/core/skbuff.c:631 __kfree_skb+0xd/0x20 net/core/skbuff.c:645 sk_wmem_free_skb include/net/sock.h:1462 [inline] tcp_write_queue_purge+0x230/0x790 net/ipv4/tcp.c:2541 RDX: 1ffffd4000440107 RSI: 0000000000000000 RDI: ffffea0002200838 tcp_v4_destroy_sock+0x8a/0x690 net/ipv4/tcp_ipv4.c:1977 inet_csk_destroy_sock+0x126/0x3a0 net/ipv4/inet_connection_sock.c:863 tcp_close+0x83a/0xf30 net/ipv4/tcp.c:2496 RBP: ffff88809f297a90 R08: ffffed1015d65079 R09: ffffed1015d65078 tls_sk_proto_close+0x541/0x8e0 net/tls/tls_main.c:312 R10: ffffed1015d65078 R11: ffff8880aeb283c7 R12: ffffea0002200834 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffea0002200800 FS: 00000000022b3940(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 inet_release+0xb9/0x1b0 net/ipv4/af_inet.c:427 __sock_release+0x1da/0x2a0 net/socket.c:579 sock_release+0xb/0x10 net/socket.c:599 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 smc_release+0x247/0x6d0 net/smc/af_smc.c:156 CR2: 00007f20c2758000 CR3: 00000000867f3000 CR4: 00000000001406e0 __sock_release+0xc7/0x2a0 net/socket.c:579 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 sock_close+0x10/0x20 net/socket.c:1140 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 __fput+0x24c/0x7f0 fs/file_table.c:278