================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: null-ptr-deref in buffer_busy fs/buffer.c:2882 [inline] BUG: KASAN: null-ptr-deref in drop_buffers.constprop.0+0x89/0x340 fs/buffer.c:2894 Read of size 4 at addr 0000000000000060 by task kswapd0/88 CPU: 1 PID: 88 Comm: kswapd0 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 kasan_report+0xda/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x190 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] buffer_busy fs/buffer.c:2882 [inline] drop_buffers.constprop.0+0x89/0x340 fs/buffer.c:2894 try_to_free_buffers+0x21a/0x2d0 fs/buffer.c:2924 filemap_release_folio+0x212/0x270 mm/filemap.c:4087 shrink_folio_list+0x292c/0x3ea0 mm/vmscan.c:1369 evict_folios+0x6e7/0x1b90 mm/vmscan.c:4521 try_to_shrink_lruvec+0x638/0xa10 mm/vmscan.c:4726 shrink_one+0x3f4/0x7b0 mm/vmscan.c:4765 shrink_many mm/vmscan.c:4828 [inline] lru_gen_shrink_node mm/vmscan.c:4929 [inline] shrink_node+0x2149/0x3740 mm/vmscan.c:5888 kswapd_shrink_node mm/vmscan.c:6693 [inline] balance_pgdat+0x9d2/0x1a90 mm/vmscan.c:6883 kswapd+0x5be/0xbf0 mm/vmscan.c:7143 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 ================================================================== general protection fault, probably for non-canonical address 0xdffffc000000000c: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000060-0x0000000000000067] CPU: 0 PID: 88 Comm: kswapd0 Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:23 [inline] RIP: 0010:raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline] RIP: 0010:atomic_read include/linux/atomic/atomic-instrumented.h:33 [inline] RIP: 0010:buffer_busy fs/buffer.c:2882 [inline] RIP: 0010:drop_buffers.constprop.0+0x90/0x340 fs/buffer.c:2894 Code: 4d 8b 76 08 4c 39 f3 0f 84 80 00 00 00 e8 d8 72 87 ff 4d 8d 66 60 be 04 00 00 00 4c 89 e7 e8 07 f0 de ff 4c 89 e0 48 c1 e8 03 <0f> b6 0c 28 4c 89 e0 83 e0 07 83 c0 03 38 c8 7c 08 84 c9 0f 85 29 RSP: 0018:ffffc9000252f2c8 EFLAGS: 00010216 RAX: 000000000000000c RBX: ffff88801c8f8108 RCX: ffffffff814e175f RDX: ffff888018b21dc0 RSI: ffffffff81df6d17 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 00000000000a4268 R12: 0000000000000060 R13: ffffea0000ad5100 R14: 0000000000000000 R15: ffffea0000ad5128 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30f2d000 CR3: 000000002befa000 CR4: 0000000000350ef0 Call Trace: try_to_free_buffers+0x21a/0x2d0 fs/buffer.c:2924 filemap_release_folio+0x212/0x270 mm/filemap.c:4087 shrink_folio_list+0x292c/0x3ea0 mm/vmscan.c:1369 evict_folios+0x6e7/0x1b90 mm/vmscan.c:4521 try_to_shrink_lruvec+0x638/0xa10 mm/vmscan.c:4726 shrink_one+0x3f4/0x7b0 mm/vmscan.c:4765 shrink_many mm/vmscan.c:4828 [inline] lru_gen_shrink_node mm/vmscan.c:4929 [inline] shrink_node+0x2149/0x3740 mm/vmscan.c:5888 kswapd_shrink_node mm/vmscan.c:6693 [inline] balance_pgdat+0x9d2/0x1a90 mm/vmscan.c:6883 kswapd+0x5be/0xbf0 mm/vmscan.c:7143 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:23 [inline] RIP: 0010:raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline] RIP: 0010:atomic_read include/linux/atomic/atomic-instrumented.h:33 [inline] RIP: 0010:buffer_busy fs/buffer.c:2882 [inline] RIP: 0010:drop_buffers.constprop.0+0x90/0x340 fs/buffer.c:2894 Code: 4d 8b 76 08 4c 39 f3 0f 84 80 00 00 00 e8 d8 72 87 ff 4d 8d 66 60 be 04 00 00 00 4c 89 e7 e8 07 f0 de ff 4c 89 e0 48 c1 e8 03 <0f> b6 0c 28 4c 89 e0 83 e0 07 83 c0 03 38 c8 7c 08 84 c9 0f 85 29 RSP: 0018:ffffc9000252f2c8 EFLAGS: 00010216 RAX: 000000000000000c RBX: ffff88801c8f8108 RCX: ffffffff814e175f RDX: ffff888018b21dc0 RSI: ffffffff81df6d17 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 00000000000a4268 R12: 0000000000000060 R13: ffffea0000ad5100 R14: 0000000000000000 R15: ffffea0000ad5128 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30f2d000 CR3: 000000002cb6a000 CR4: 0000000000350ef0 ---------------- Code disassembly (best guess): 0: 4d 8b 76 08 mov 0x8(%r14),%r14 4: 4c 39 f3 cmp %r14,%rbx 7: 0f 84 80 00 00 00 je 0x8d d: e8 d8 72 87 ff call 0xff8772ea 12: 4d 8d 66 60 lea 0x60(%r14),%r12 16: be 04 00 00 00 mov $0x4,%esi 1b: 4c 89 e7 mov %r12,%rdi 1e: e8 07 f0 de ff call 0xffdef02a 23: 4c 89 e0 mov %r12,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 0f b6 0c 28 movzbl (%rax,%rbp,1),%ecx <-- trapping instruction 2e: 4c 89 e0 mov %r12,%rax 31: 83 e0 07 and $0x7,%eax 34: 83 c0 03 add $0x3,%eax 37: 38 c8 cmp %cl,%al 39: 7c 08 jl 0x43 3b: 84 c9 test %cl,%cl 3d: 0f .byte 0xf 3e: 85 29 test %ebp,(%rcx)