syzbot


kernel BUG in add_to_swap

Status: upstream: reported on 2023/12/19 13:09
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+9c40fd6eff0f3277cc9e@syzkaller.appspotmail.com
First crash: 120d, last: 55d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] kernel BUG in add_to_swap 1 (2) 2023/12/20 04:19
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 kernel BUG in add_to_swap 3 25d 108d 0/3 upstream: reported on 2023/12/27 22:40
linux-6.1 kernel BUG in add_to_swap 2 38d 94d 0/3 upstream: reported on 2024/01/10 22:06

Sample crash report:
page dumped because: VM_BUG_ON_FOLIO(!folio_test_uptodate(folio))
------------[ cut here ]------------
kernel BUG at mm/swap_state.c:183!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 16454 Comm: syz-executor.3 Tainted: G    B              6.8.0-rc4-syzkaller-g905b00721763 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : add_to_swap+0x1b4/0x1b8 mm/swap_state.c:183
lr : add_to_swap+0x1b4/0x1b8 mm/swap_state.c:183
sp : ffff8000a61b6140
x29: ffff8000a61b6140 x28: fffffdffc38734d8 x27: 1fffffbff870e69b
x26: 0000000000000000 x25: dfff800000000000 x24: 05ffc00000482011
x23: 1fffffbff870e698 x22: 1fffffbff870e699 x21: dfff800000000000
x20: 05ffc00000482011 x19: fffffdffc38734c0 x18: 1fffe00036804796
x17: ffff80008ec8d000 x16: ffff80008ad63400 x15: 0000000000000001
x14: 1ffff00014c36b6c x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000040000 x10: 000000000003ffff x9 : ffff80009f7eb000
x8 : 0000000000040000 x7 : 1fffe00036804797
 x6 : ffff8000802963d0
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800082f21070
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000041
Call trace:
 add_to_swap+0x1b4/0x1b8 mm/swap_state.c:183
 shrink_folio_list+0x2164/0x4b84 mm/vmscan.c:1210
 shrink_inactive_list mm/vmscan.c:1914 [inline]
 shrink_list mm/vmscan.c:2155 [inline]
 shrink_lruvec+0x12a4/0x27b4 mm/vmscan.c:5681
 shrink_node_memcgs mm/vmscan.c:5867 [inline]
 shrink_node+0xe10/0x2268 mm/vmscan.c:5902
 shrink_zones mm/vmscan.c:6141 [inline]
 do_try_to_free_pages+0x5f8/0x14fc mm/vmscan.c:6203
 try_to_free_mem_cgroup_pages+0x3a0/0xbac mm/vmscan.c:6518
 try_charge_memcg+0x4a4/0x148c mm/memcontrol.c:2782
 try_charge mm/memcontrol.c:2930 [inline]
 charge_memcg mm/memcontrol.c:7276 [inline]
 __mem_cgroup_charge+0xa8/0x148 mm/memcontrol.c:7291
 mem_cgroup_charge include/linux/memcontrol.h:690 [inline]
 __filemap_add_folio+0x3d4/0x1264 mm/filemap.c:855
 filemap_add_folio+0x10c/0x298 mm/filemap.c:938
 page_cache_ra_unbounded+0x1c0/0x58c mm/readahead.c:250
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order+0x7c0/0x950 mm/readahead.c:544
 do_sync_mmap_readahead+0x368/0x74c
 filemap_fault+0x570/0xff4 mm/filemap.c:3245
 __do_fault+0x11c/0x374 mm/memory.c:4376
 do_cow_fault mm/memory.c:4768 [inline]
 do_fault mm/memory.c:4870 [inline]
 do_pte_missing mm/memory.c:3745 [inline]
 handle_pte_fault mm/memory.c:5144 [inline]
 __handle_mm_fault mm/memory.c:5285 [inline]
 handle_mm_fault+0x1bdc/0x546c mm/memory.c:5450
 __do_page_fault arch/arm64/mm/fault.c:505 [inline]
 do_page_fault+0x4f8/0xa64 arch/arm64/mm/fault.c:620
 do_translation_fault+0x94/0xc8 arch/arm64/mm/fault.c:704
 do_mem_abort+0x74/0x200 arch/arm64/mm/fault.c:840
 el0_da+0x60/0x168 arch/arm64/kernel/entry-common.c:546
 el0t_64_sync_handler+0xcc/0xfc arch/arm64/kernel/entry-common.c:699
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
Code: d0052fa1 91348021 aa1303e0 97fc6de3 (d4210000) 
---[ end trace 0000000000000000 ]---

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/18 10:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 905b00721763 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
2024/02/16 20:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 905b00721763 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
2024/01/31 22:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 41bccc98fb79 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
2024/01/31 01:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 41bccc98fb79 7f400fcb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
2024/01/09 04:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
2023/12/15 13:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d5b235ec8eab 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in add_to_swap
* Struck through repros no longer work on HEAD.