bisecting fixing commit since fb683b5e3f53a73e761952735736180939a313df building syzkaller on 08003f6440deafc4e193b159c4acece64f7864b1 testing commit fb683b5e3f53a73e761952735736180939a313df with gcc (GCC) 8.4.1 20210217 kernel signature: a3898a35712cd557dd0b1e2e6b81009030e17302daa7db8971595b7249003da4 run #0: crashed: general protection fault in cdev_del run #1: crashed: general protection fault in cdev_del run #2: crashed: general protection fault in corrupted run #3: crashed: general protection fault in corrupted run #4: crashed: general protection fault in cdev_del run #5: crashed: general protection fault in cdev_del run #6: crashed: general protection fault in cdev_del run #7: crashed: general protection fault in cdev_del run #8: crashed: general protection fault in cdev_del run #9: crashed: general protection fault in cdev_del run #10: crashed: general protection fault in gsmld_close run #11: crashed: general protection fault in cdev_del run #12: crashed: general protection fault in cdev_del run #13: crashed: general protection fault in corrupted run #14: crashed: general protection fault in cdev_del run #15: crashed: general protection fault in cdev_del run #16: crashed: general protection fault in cdev_del run #17: crashed: general protection fault in cdev_del run #18: crashed: general protection fault in cdev_del run #19: crashed: general protection fault in cdev_del testing current HEAD 2965db2e004cf9c92b87c1f559e9812c0ae878c1 testing commit 2965db2e004cf9c92b87c1f559e9812c0ae878c1 with gcc (GCC) 8.4.1 20210217 kernel signature: 98ed79767b8bd52f2f37ff989afac4e2353d394f1b0cad8a38b1de720dd5682d all runs: crashed: general protection fault in cdev_del revisions tested: 2, total time: 31m17.70025522s (build: 23m41.715233967s, test: 6m46.674483918s) the crash still happens on HEAD commit msg: Linux 4.19.188 crash: general protection fault in cdev_del Node 0 Normal: 80*4kB (UME) 83*8kB (UE) 20*16kB (UME) 16*32kB (UE) 1*64kB (U) 3*128kB (UME) 1*256kB (M) 2*512kB (ME) 0*1024kB 2*2048kB (UE) 798*4096kB (M) = 3276248kB kasan: GPF could be caused by NULL-ptr deref or user memory access FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 general protection fault: 0000 [#1] PREEMPT SMP KASAN Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB CPU: 0 PID: 7533 Comm: syz-executor.5 Not tainted 4.19.188-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:cdev_del+0x21/0x90 fs/char_dev.c:602 Code: 66 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 53 48 89 fb 48 83 c7 64 48 89 fa 48 83 ec 08 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4f 48 Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB RSP: 0018:ffff8881d770fc80 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 000000000000000c RSI: 0000000000000000 RDI: 0000000000000064 RBP: ffff8881d770fc90 R08: ffff8881efd00c50 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000408 R13: ffff8881edb43008 R14: ffff8881ed475088 R15: 0000000000000001 FS: 0000000001884400(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd9c056fe8 CR3: 00000001d8ef8001 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tty_unregister_device drivers/tty/tty_io.c:3054 [inline] tty_unregister_device+0xfb/0x1a0 drivers/tty/tty_io.c:3049 21942 total pagecache pages gsmld_detach_gsm drivers/tty/n_gsm.c:2289 [inline] gsmld_close+0xa8/0x150 drivers/tty/n_gsm.c:2358 tty_ldisc_close.isra.2+0x89/0xc0 drivers/tty/tty_ldisc.c:493 tty_ldisc_kill+0x3c/0xb0 drivers/tty/tty_ldisc.c:639 tty_ldisc_release+0xb8/0x1a0 drivers/tty/tty_ldisc.c:806 tty_release_struct+0x12/0x50 drivers/tty/tty_io.c:1611 tty_release+0x97e/0xc60 drivers/tty/tty_io.c:1784 0 pages in swap cache __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 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+0x413/0x4e0 arch/x86/entry/common.c:296 Swap cache stats: add 0, delete 0, find 0/0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x41547b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff078ed6d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 Free swap = 0kB RAX: 0000000000000000 RBX: 0000000000000001 RCX: 000000000041547b RDX: 0000000000000543 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000005 R08: 0000000000000000 R09: 0000001b309201c0 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000000b5a6 R13: 000000000052c980 R14: 000000000052bfb4 R15: 000000000052bf00 Modules linked in: Total swap = 0kB ---[ end trace 84241a498b098296 ]--- CPU: 1 PID: 7600 Comm: syz-executor.1 Tainted: G D 4.19.188-syzkaller #0 RIP: 0010:cdev_del+0x21/0x90 fs/char_dev.c:602 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x171 lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0x5/0xa lib/fault-inject.c:149 __should_failslab+0xba/0xf0 mm/failslab.c:32 Code: 66 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 53 48 89 fb 48 83 c7 64 48 89 fa 48 83 ec 08 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4f 48 should_failslab+0x9/0x20 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc_node mm/slab.c:3304 [inline] kmem_cache_alloc_node_trace+0x265/0x730 mm/slab.c:3666 __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node+0x3c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] __vmalloc_area_node mm/vmalloc.c:1677 [inline] __vmalloc_node_range+0x13c/0x630 mm/vmalloc.c:1753 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vzalloc+0x6a/0x80 mm/vmalloc.c:1857 n_tty_open+0x16/0x150 drivers/tty/n_tty.c:1912 tty_ldisc_open.isra.3+0x65/0xa0 drivers/tty/tty_ldisc.c:469 tty_ldisc_failto+0x107/0x160 drivers/tty/tty_ldisc.c:515 tty_ldisc_restore drivers/tty/tty_ldisc.c:532 [inline] tty_set_ldisc+0x450/0x5a0 drivers/tty/tty_ldisc.c:598 tiocsetd drivers/tty/tty_io.c:2359 [inline] tty_ioctl+0x31e/0x1290 drivers/tty/tty_io.c:2603 RSP: 0018:ffff8881d770fc80 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 RDX: 000000000000000c RSI: 0000000000000000 RDI: 0000000000000064 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RBP: ffff8881d770fc90 R08: ffff8881efd00c50 R09: 0000000000000000 RIP: 0033:0x462209 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb4072121a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000052bf00 RCX: 0000000000462209 RDX: 00000000200003c0 RSI: 0000000000005423 RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00000000004f50a8 R14: 00000000004b1907 R15: 00007fb4072126bc 2097051 pages RAM R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000408 0 pages HighMem/MovableOnly R13: ffff8881edb43008 R14: ffff8881ed475088 R15: 0000000000000001 356130 pages reserved FS: 0000000001884400(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 0 pages cma reserved CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Falling back ldisc for ptm1. CR2: 00007ffd9c05bfcc CR3: 00000001d8ef8005 CR4: 00000000001606f0 Falling back ldisc for ptm5. DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kasan: CONFIG_KASAN_INLINE enabled DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kasan: CONFIG_KASAN_INLINE enabled FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 kasan: CONFIG_KASAN_INLINE enabled FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 kasan: GPF could be caused by NULL-ptr deref or user memory access CPU: 0 PID: 7791 Comm: syz-executor.1 Tainted: G D 4.19.188-syzkaller #0 kasan: GPF could be caused by NULL-ptr deref or user memory access Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x171 lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0x5/0xa lib/fault-inject.c:149 __should_failslab+0xba/0xf0 mm/failslab.c:32 should_failslab+0x9/0x20 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc_node mm/slab.c:3304 [inline] kmem_cache_alloc_node_trace+0x265/0x730 mm/slab.c:3666 kasan: GPF could be caused by NULL-ptr deref or user memory access __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node+0x3c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] __vmalloc_area_node mm/vmalloc.c:1677 [inline] __vmalloc_node_range+0x13c/0x630 mm/vmalloc.c:1753 general protection fault: 0000 [#2] PREEMPT SMP KASAN __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vzalloc+0x6a/0x80 mm/vmalloc.c:1857 CPU: 1 PID: 7494 Comm: syz-executor.4 Tainted: G D 4.19.188-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 n_tty_open+0x16/0x150 drivers/tty/n_tty.c:1912 RIP: 0010:cdev_del+0x21/0x90 fs/char_dev.c:602 tty_ldisc_open.isra.3+0x65/0xa0 drivers/tty/tty_ldisc.c:469 Code: 66 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 53 48 89 fb 48 83 c7 64 48 89 fa 48 83 ec 08 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4f 48 RSP: 0018:ffff8881d76df9f0 EFLAGS: 00010207 tty_ldisc_failto+0x107/0x160 drivers/tty/tty_ldisc.c:515 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 tty_ldisc_restore drivers/tty/tty_ldisc.c:532 [inline] tty_set_ldisc+0x450/0x5a0 drivers/tty/tty_ldisc.c:598 RDX: 000000000000000c RSI: 0000000000000000 RDI: 0000000000000064 tiocsetd drivers/tty/tty_io.c:2359 [inline] tty_ioctl+0x31e/0x1290 drivers/tty/tty_io.c:2603 RBP: ffff8881d76dfa00 R08: ffffed103ea38cbf R09: ffffed103ea38cbe R10: ffffed103ea38cbe R11: ffff8881f51c65f3 R12: 0000000000000608 R13: ffff8881edb43008 R14: ffff8881ed475288 R15: 0000000000000001 FS: 00007f79a73eb700(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005560f725d180 CR3: 00000001cf3f9002 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tty_unregister_device drivers/tty/tty_io.c:3054 [inline] tty_unregister_device+0xfb/0x1a0 drivers/tty/tty_io.c:3049 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 gsmld_detach_gsm drivers/tty/n_gsm.c:2289 [inline] gsmld_close+0xa8/0x150 drivers/tty/n_gsm.c:2358 tty_ldisc_close.isra.2+0x89/0xc0 drivers/tty/tty_ldisc.c:493 tty_ldisc_kill+0x3c/0xb0 drivers/tty/tty_ldisc.c:639 tty_ldisc_release+0xb8/0x1a0 drivers/tty/tty_ldisc.c:806 tty_release_struct+0x12/0x50 drivers/tty/tty_io.c:1611 tty_release+0x97e/0xc60 drivers/tty/tty_io.c:1784 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 get_signal+0x13a8/0x19e0 kernel/signal.c:2400 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 do_signal+0x87/0x1960 arch/x86/kernel/signal.c:799 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x462209 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb4072121a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000052bf00 RCX: 0000000000462209 RDX: 00000000200003c0 RSI: 0000000000005423 RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00000000004f50a8 R14: 00000000004b1907 R15: 00007fb4072126bc