Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in create_empty_buffers
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 10143 Comm: systemd-udevd Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:create_empty_buffers+0x4f/0x820 fs/buffer.c:1584
Code: 89 ef e8 d4 96 ff ff 49 bc 00 00 00 00 00 fc ff df 48 89 44 24 08 48 89 c3 eb 03 48 89 c3 e8 f8 1c a0 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 a8 06 00 00 4c 09 2b 48 8d 7b 08 48 89 f8 48
RSP: 0018:ffffc9000acd71a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802e1f0200 RSI: ffffffff81d3e918 RDI: ffff88802e1f1758
RBP: ffffea00007bfb00 R08: 0000000000000000 R09: ffffea00007bfb07
R10: ffffffff81d38477 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: 0000000000000000 R15: dead000000000100
FS: 00007f6dd42048c0(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd3cedf6718 CR3: 0000000030e0f000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
create_page_buffers+0x2ac/0x3c0 fs/buffer.c:1698
block_read_full_page+0xc9/0xe40 fs/buffer.c:2289
do_mpage_readpage+0xa44/0x2070 fs/mpage.c:339
mpage_readahead+0x3a3/0x880 fs/mpage.c:396
read_pages+0x1df/0x8d0 mm/readahead.c:130
page_cache_ra_unbounded+0x61f/0x920 mm/readahead.c:238
do_page_cache_ra mm/readahead.c:267 [inline]
force_page_cache_ra+0x3ba/0x5b0 mm/readahead.c:299
page_cache_sync_ra+0x107/0x200 mm/readahead.c:573
page_cache_sync_readahead include/linux/pagemap.h:879 [inline]
filemap_get_pages+0x29f/0x1920 mm/filemap.c:2467
filemap_read+0x2ca/0xe40 mm/filemap.c:2550
generic_file_read_iter+0x397/0x4f0 mm/filemap.c:2701
blkdev_read_iter+0x127/0x1c0 fs/block_dev.c:1732
call_read_iter include/linux/fs.h:2108 [inline]
new_sync_read+0x41e/0x6e0 fs/read_write.c:415
vfs_read+0x35c/0x570 fs/read_write.c:496
ksys_read+0x12d/0x250 fs/read_write.c:634
do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6dd334a210
Code: 73 01 c3 48 8b 0d 98 7d 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d b9 c1 20 00 00 75 10 b8 00 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 4e fc ff ff 48 89 04 24
RSP: 002b:00007ffed9915668 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00005600b5cd4b40 RCX: 00007f6dd334a210
RDX: 0000000000000400 RSI: 00005600b5cd4b68 RDI: 000000000000000f
RBP: 00005600b5cc1b40 R08: 00007f6dd3334f78 R09: 0000000000000430
R10: 00005600b5cd4b58 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000400 R14: 00005600b5cc1b90 R15: 0000000000000400
Modules linked in:
---[ end trace 97d9c5b804814f8a ]---
RIP: 0010:create_empty_buffers+0x4f/0x820 fs/buffer.c:1584
Code: 89 ef e8 d4 96 ff ff 49 bc 00 00 00 00 00 fc ff df 48 89 44 24 08 48 89 c3 eb 03 48 89 c3 e8 f8 1c a0 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 0f 85 a8 06 00 00 4c 09 2b 48 8d 7b 08 48 89 f8 48
RSP: 0018:ffffc9000acd71a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802e1f0200 RSI: ffffffff81d3e918 RDI: ffff88802e1f1758
RBP: ffffea00007bfb00 R08: 0000000000000000 R09: ffffea00007bfb07
R10: ffffffff81d38477 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: 0000000000000000 R15: dead000000000100
FS: 00007f6dd42048c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbe79a88000 CR3: 0000000030e0f000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Tested on:
commit: 25a12987 Merge tag 'trace-v5.13-rc1' of git://git.kernel.o..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=13f76223d00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d1d689750e82a1f
dashboard link:
https://syzkaller.appspot.com/bug?extid=cf89d662483d6a1a0790
compiler:
patch:
https://syzkaller.appspot.com/x/patch.diff?x=1420de73d00000