bisecting cause commit starting from 1e78030e5e5b2d8b0cad7136caf9cfab986a6bff building syzkaller on 835dffe7e5d185154a9b147476a17b6301ee139e testing commit 1e78030e5e5b2d8b0cad7136caf9cfab986a6bff with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #1: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #2: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #3: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #4: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #5: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #6: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #7: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #8: crashed: KASAN: use-after-free Read in blkdev_direct_IO run #9: OK testing release v5.2 testing commit 0ecfebd2b52404ae0c54a878c872bb93363ada36 with gcc (GCC) 8.1.0 all runs: OK # git bisect start 1e78030e5e5b2d8b0cad7136caf9cfab986a6bff v5.2 Bisecting: 6922 revisions left to test after this (roughly 13 steps) [17a20acaf171124017f43bc70bb4d7ca88070659] Merge tag 'usb-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb testing commit 17a20acaf171124017f43bc70bb4d7ca88070659 with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 17a20acaf171124017f43bc70bb4d7ca88070659 Bisecting: 3621 revisions left to test after this (roughly 12 steps) [8f6ccf6159aed1f04c6d179f61f6fb2691261e84] Merge tag 'clone3-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux testing commit 8f6ccf6159aed1f04c6d179f61f6fb2691261e84 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 8f6ccf6159aed1f04c6d179f61f6fb2691261e84 Bisecting: 1810 revisions left to test after this (roughly 11 steps) [28261da8a26f4915aa257d12d506c6ba179d961f] Bluetooth: Check state in l2cap_disconnect_rsp testing commit 28261da8a26f4915aa257d12d506c6ba179d961f with gcc (GCC) 8.1.0 all runs: OK # git bisect good 28261da8a26f4915aa257d12d506c6ba179d961f Bisecting: 838 revisions left to test after this (roughly 10 steps) [97ff4ca46d3279134cec49752de8c5a62dc68460] Merge tag 'char-misc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc testing commit 97ff4ca46d3279134cec49752de8c5a62dc68460 with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: crashed: general protection fault in send_hsr_supervision_frame run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 97ff4ca46d3279134cec49752de8c5a62dc68460 Bisecting: 485 revisions left to test after this (roughly 9 steps) [a131c2bf165684315f606fdd88cf80be22ba32f3] Merge tag 'acpi-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit a131c2bf165684315f606fdd88cf80be22ba32f3 with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: crashed: general protection fault in send_hsr_supervision_frame run #4: crashed: general protection fault in send_hsr_supervision_frame run #5: crashed: general protection fault in send_hsr_supervision_frame run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad a131c2bf165684315f606fdd88cf80be22ba32f3 Bisecting: 249 revisions left to test after this (roughly 8 steps) [7650b1a9bd693d133a3ec0548ba63e828f34e3ec] Merge branch 'mp-inner-L3' testing commit 7650b1a9bd693d133a3ec0548ba63e828f34e3ec with gcc (GCC) 8.1.0 all runs: OK # git bisect good 7650b1a9bd693d133a3ec0548ba63e828f34e3ec Bisecting: 129 revisions left to test after this (roughly 7 steps) [e858faf556d4e14c750ba1e8852783c6f9520a0e] tcp: Reset bytes_acked and bytes_received when disconnecting testing commit e858faf556d4e14c750ba1e8852783c6f9520a0e with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad e858faf556d4e14c750ba1e8852783c6f9520a0e Bisecting: 59 revisions left to test after this (roughly 6 steps) [3d26eb8ad1e9b906433903ce05f775cf038e747f] net: bridge: don't cache ether dest pointer on input testing commit 3d26eb8ad1e9b906433903ce05f775cf038e747f with gcc (GCC) 8.1.0 all runs: OK # git bisect good 3d26eb8ad1e9b906433903ce05f775cf038e747f Bisecting: 30 revisions left to test after this (roughly 5 steps) [9d1bc24b52fb8c5d859f9a47084bf1179470e04c] bonding: validate ip header before check IPPROTO_IGMP testing commit 9d1bc24b52fb8c5d859f9a47084bf1179470e04c with gcc (GCC) 8.1.0 all runs: OK # git bisect good 9d1bc24b52fb8c5d859f9a47084bf1179470e04c Bisecting: 15 revisions left to test after this (roughly 4 steps) [13aecb17acabc2a92187d08f7ca93bb8aad62c6f] net/tls: fix poll ignoring partially copied records testing commit 13aecb17acabc2a92187d08f7ca93bb8aad62c6f with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad 13aecb17acabc2a92187d08f7ca93bb8aad62c6f Bisecting: 7 revisions left to test after this (roughly 3 steps) [56c5ee1a5823e9cf5288b84ae6364cb4112f8225] xfrm interface: fix memory leak on creation testing commit 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 Bisecting: 3 revisions left to test after this (roughly 2 steps) [edf070a0fb45ac845f534baf172fbadbeb5048c6] hsr: fix a NULL pointer deref in hsr_dev_xmit() testing commit edf070a0fb45ac845f534baf172fbadbeb5048c6 with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad edf070a0fb45ac845f534baf172fbadbeb5048c6 Bisecting: 1 revision left to test after this (roughly 1 step) [619afef01f74f3572b5e9a266c1230dc83761eec] hsr: fix a memory leak in hsr_del_port() testing commit 619afef01f74f3572b5e9a266c1230dc83761eec with gcc (GCC) 8.1.0 all runs: OK # git bisect good 619afef01f74f3572b5e9a266c1230dc83761eec Bisecting: 0 revisions left to test after this (roughly 0 steps) [b9a1e627405d68d475a3c1f35e685ccfb5bbe668] hsr: implement dellink to clean up resources testing commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 with gcc (GCC) 8.1.0 run #0: crashed: general protection fault in send_hsr_supervision_frame run #1: crashed: general protection fault in send_hsr_supervision_frame run #2: crashed: general protection fault in send_hsr_supervision_frame run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK # git bisect bad b9a1e627405d68d475a3c1f35e685ccfb5bbe668 b9a1e627405d68d475a3c1f35e685ccfb5bbe668 is the first bad commit commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 Author: Cong Wang Date: Wed Jul 3 17:21:13 2019 -0700 hsr: implement dellink to clean up resources hsr_link_ops implements ->newlink() but not ->dellink(), which leads that resources not released after removing the device, particularly the entries in self_node_db and node_db. So add ->dellink() implementation to replace the priv_destructor. This also makes the code slightly easier to understand. Reported-by: syzbot+c6167ec3de7def23d1e8@syzkaller.appspotmail.com Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller :040000 040000 65599c9790197ff086c1843ca65b40688d162283 07d35e0ebb6f5a6fa2ee09ede31e24b8def82990 M net revisions tested: 16, total time: 4h41m36.585552048s (build: 1h32m52.655486337s, test: 3h3m15.641546432s) first bad commit: b9a1e627405d68d475a3c1f35e685ccfb5bbe668 hsr: implement dellink to clean up resources cc: ["arvid.brodin@alten.se" "davem@davemloft.net" "linux-kernel@vger.kernel.org" "netdev@vger.kernel.org" "xiyou.wangcong@gmail.com"] crash: general protection fault in send_hsr_supervision_frame kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.2.0-rc6+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:send_hsr_supervision_frame+0x30/0xf60 net/hsr/hsr_device.c:251 Code: 89 e5 41 57 41 56 41 55 49 89 fd 41 54 41 89 d4 48 89 c2 53 48 c1 ea 03 48 83 ec 50 48 89 45 d0 48 b8 00 00 00 00 00 fc ff df <80> 3c 02 00 89 75 c8 0f 85 83 0c 00 00 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffff8880aea09c68 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: ffff888083f0d580 RCX: 1ffff110107c1f74 RDX: 0000000000000002 RSI: 0000000000000017 RDI: 0000000000000000 RBP: ffff8880aea09ce0 R08: ffffed1015d46c70 R09: ffffed1015d46c6f R10: ffffed1015d46c6f R11: ffff8880aea3637b R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880aea09db8 R15: ffff8880aea24b80 FS: 0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000ad1fd0 CR3: 00000000a1715000 CR4: 00000000001406f0 Call Trace: hsr_announce+0xd9/0x2b0 net/hsr/hsr_device.c:335 call_timer_fn+0x14d/0x510 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] run_timer_softirq+0xc6f/0x1330 kernel/time/timer.c:1698 __do_softirq+0x260/0x958 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13e/0x540 arch/x86/kernel/apic/apic.c:1068 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806 RIP: 0010:native_safe_halt+0x12/0x20 arch/x86/include/asm/irqflags.h:61 Code: 11 ff ff ff 4c 89 e7 e8 fc 20 f4 fa eb 97 90 90 90 90 90 90 90 90 90 90 55 48 89 e5 e9 07 00 00 00 0f 00 2d e0 6f 63 00 fb f4 <5d> c3 66 90 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 e9 07 00 00 RSP: 0018:ffffffff88207ce0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffffffff8827a040 RCX: 0000000000000000 RDX: 1ffffffff10643e1 RSI: 0000000000000006 RDI: ffffffff88321f08 RBP: ffffffff88207ce0 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff88321ef8 R14: 0000000000000000 R15: ffffffff88f69ef8 arch_safe_halt arch/x86/include/asm/paravirt.h:156 [inline] default_idle+0x51/0x310 arch/x86/kernel/process.c:580 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571 default_idle_call+0x6d/0x90 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3e4/0x590 kernel/sched/idle.c:263 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:354 rest_init+0x1a4/0x279 init/main.c:451 arch_call_rest_init+0x9/0xc start_kernel+0x6bd/0x6f8 init/main.c:761 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Modules linked in: ---[ end trace ab247825691eb892 ]--- RIP: 0010:send_hsr_supervision_frame+0x30/0xf60 net/hsr/hsr_device.c:251 Code: 89 e5 41 57 41 56 41 55 49 89 fd 41 54 41 89 d4 48 89 c2 53 48 c1 ea 03 48 83 ec 50 48 89 45 d0 48 b8 00 00 00 00 00 fc ff df <80> 3c 02 00 89 75 c8 0f 85 83 0c 00 00 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffff8880aea09c68 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: ffff888083f0d580 RCX: 1ffff110107c1f74 RDX: 0000000000000002 RSI: 0000000000000017 RDI: 0000000000000000 RBP: ffff8880aea09ce0 R08: ffffed1015d46c70 R09: ffffed1015d46c6f R10: ffffed1015d46c6f R11: ffff8880aea3637b R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880aea09db8 R15: ffff8880aea24b80 FS: 0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000ad1fd0 CR3: 00000000a1715000 CR4: 00000000001406f0