bisecting fixing commit since 8e37395c3a5dceff62a5010ebbbc107f4145935c building syzkaller on 418a00eb23ef6f6d2f60255c6185520ceaa2d0db testing commit 8e37395c3a5dceff62a5010ebbbc107f4145935c compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8001aacabe270e02bf923bf02655cf1a2177a893061e26128d205fd3a8aa0c35 all runs: crashed: general protection fault in sg_alloc_append_table_from_pages testing current HEAD c741e49150dbb0c0aebe234389f4aa8b47958fa8 testing commit c741e49150dbb0c0aebe234389f4aa8b47958fa8 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 02983b4211ec5257a358d11b652fd43463b0b472321aed846ad26f8f32dde5d7 all runs: crashed: general protection fault in sg_alloc_append_table_from_pages revisions tested: 2, total time: 19m28.077072583s (build: 12m35.165560137s, test: 6m13.335189659s) the crash still happens on HEAD commit msg: Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma crash: general protection fault in sg_alloc_append_table_from_pages general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 0 PID: 4062 Comm: syz-executor.1 Not tainted 5.16.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:sg_alloc_append_table_from_pages+0x546/0xee0 lib/scatterlist.c:525 Code: 0f 85 ce 08 00 00 4d 8b 26 48 8b 44 24 10 49 8d 34 cf 89 dd 29 cd 48 89 f1 c1 e5 0c 2b 2c 24 48 39 c5 48 0f 46 c5 48 c1 e9 03 <42> 80 3c 29 00 0f 85 9f 07 00 00 48 8b 36 4c 89 e1 83 e1 03 40 f6 RSP: 0018:ffffc900029bfc50 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000002 RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000000000000000 RBP: 0000000000001000 R08: 0000000000000001 R09: 00000000fffff000 R10: 0000000000000001 R11: 000000000007a08a R12: 0000000000000002 R13: dffffc0000000000 R14: ffff888017cd3480 R15: 0000000000000010 FS: 00007f25ba865700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f25ba865718 CR3: 000000001cbd4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sg_alloc_table_from_pages_segment+0x95/0x1c0 lib/scatterlist.c:573 sg_alloc_table_from_pages include/linux/scatterlist.h:331 [inline] get_sg_table.isra.0+0xad/0x140 drivers/dma-buf/udmabuf.c:67 begin_cpu_udmabuf+0x10b/0x1d0 drivers/dma-buf/udmabuf.c:126 dma_buf_begin_cpu_access+0xe2/0x180 drivers/dma-buf/dma-buf.c:1175 dma_buf_ioctl+0x1fd/0x2e0 drivers/dma-buf/dma-buf.c:374 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f25bb131a39 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:00007f25ba865188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f25bb2350e0 RCX: 00007f25bb131a39 RDX: 0000000020000000 RSI: 0000000040086200 RDI: 0000000000000004 RBP: 00007f25bb18bc5f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd15a94d1f R14: 00007f25ba865300 R15: 0000000000022000 Modules linked in: ---[ end trace c36524126347d68e ]--- RIP: 0010:sg_alloc_append_table_from_pages+0x546/0xee0 lib/scatterlist.c:525 Code: 0f 85 ce 08 00 00 4d 8b 26 48 8b 44 24 10 49 8d 34 cf 89 dd 29 cd 48 89 f1 c1 e5 0c 2b 2c 24 48 39 c5 48 0f 46 c5 48 c1 e9 03 <42> 80 3c 29 00 0f 85 9f 07 00 00 48 8b 36 4c 89 e1 83 e1 03 40 f6 RSP: 0018:ffffc900029bfc50 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000002 RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000000000000000 RBP: 0000000000001000 R08: 0000000000000001 R09: 00000000fffff000 R10: 0000000000000001 R11: 000000000007a08a R12: 0000000000000002 R13: dffffc0000000000 R14: ffff888017cd3480 R15: 0000000000000010 FS: 00007f25ba865700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f25ba865718 CR3: 000000001cbd4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 0f 85 ce 08 00 00 jne 0x8d4 6: 4d 8b 26 mov (%r14),%r12 9: 48 8b 44 24 10 mov 0x10(%rsp),%rax e: 49 8d 34 cf lea (%r15,%rcx,8),%rsi 12: 89 dd mov %ebx,%ebp 14: 29 cd sub %ecx,%ebp 16: 48 89 f1 mov %rsi,%rcx 19: c1 e5 0c shl $0xc,%ebp 1c: 2b 2c 24 sub (%rsp),%ebp 1f: 48 39 c5 cmp %rax,%rbp 22: 48 0f 46 c5 cmovbe %rbp,%rax 26: 48 c1 e9 03 shr $0x3,%rcx * 2a: 42 80 3c 29 00 cmpb $0x0,(%rcx,%r13,1) <-- trapping instruction 2f: 0f 85 9f 07 00 00 jne 0x7d4 35: 48 8b 36 mov (%rsi),%rsi 38: 4c 89 e1 mov %r12,%rcx 3b: 83 e1 03 and $0x3,%ecx 3e: 40 rex 3f: f6 .byte 0xf6