syzbot


WARNING: locking bug in hugetlb_no_page

Status: fixed on 2023/02/24 13:50
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+d07c65298d2c15eafcb0@syzkaller.appspotmail.com
Fix commit: 04ada095dcfc hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing
First crash: 531d, last: 531d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] WARNING: locking bug in hugetlb_no_page 5 (6) 2022/11/14 09:59
[syzbot] possible deadlock in hugetlb_fault 6 (7) 2022/11/14 09:57
Last patch testing requests (3)
Created Duration User Patch Repo Result
2022/11/13 11:53 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 1621b6eaebf7 report log
2022/11/13 05:58 10m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 1621b6eaebf7 report log
2022/11/13 03:16 11m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 1621b6eaebf7 report log

Sample crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(!test_bit(class_idx, lock_classes_in_use))
WARNING: CPU: 1 PID: 3290 at kernel/locking/lockdep.c:5025 __lock_acquire+0x2758/0x3084
Modules linked in:
CPU: 1 PID: 3290 Comm: syz-executor317 Not tainted 6.1.0-rc4-syzkaller-31872-g1621b6eaebf7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __lock_acquire+0x2758/0x3084
lr : __lock_acquire+0x2754/0x3084 kernel/locking/lockdep.c:5025
sp : ffff800012e3b3e0
x29: ffff800012e3b4c0 x28: 0000000000000001 x27: ffff0000cb891a68
x26: ffff0000cb892450 x25: ffff0000cb892470 x24: ffff0000cb892470
x23: 00000000000000c0 x22: 0000000000000001 x21: 0000000000000000
x20: ffff0000cb891a40 x19: aaaaaa0000fb22ca x18: 0000000000000358
x17: ffff80000c04d83c x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000012 x12: ffff80000d86ff30
x11: ff808000081c06c8 x10: 0000000000000000 x9 : ddc86c2f228f9600
x8 : ddc86c2f228f9600 x7 : 4e5241575f534b43 x6 : ffff80000c01775c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000100000000 x0 : 0000000000000000
Call trace:
 __lock_acquire+0x2758/0x3084
 reacquire_held_locks+0x120/0x1c0 kernel/locking/lockdep.c:5193
 __lock_release kernel/locking/lockdep.c:5382 [inline]
 lock_release+0x148/0x2b4 kernel/locking/lockdep.c:5688
 __mutex_unlock_slowpath+0x44/0x1cc kernel/locking/mutex.c:907
 mutex_unlock+0x24/0x30 kernel/locking/mutex.c:543
 hugetlb_no_page+0x284/0xe1c mm/hugetlb.c:5771
 hugetlb_fault+0x3a0/0xdfc mm/hugetlb.c:5874
 handle_mm_fault+0x904/0xa48 mm/memory.c:5216
 __do_page_fault arch/arm64/mm/fault.c:506 [inline]
 do_page_fault+0x428/0x79c arch/arm64/mm/fault.c:606
 do_translation_fault+0x78/0x194 arch/arm64/mm/fault.c:689
 do_mem_abort+0x54/0x130 arch/arm64/mm/fault.c:825
 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:367
 el1h_64_sync_handler+0x60/0xac arch/arm64/kernel/entry-common.c:427
 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:579
 __arch_copy_from_user+0x24/0x1f4 arch/arm64/lib/copy_from_user.S:77
 __import_iovec+0x60/0x248 lib/iov_iter.c:1773
 import_iovec+0x6c/0x88 lib/iov_iter.c:1838
 vfs_writev fs/read_write.c:931 [inline]
 do_writev+0xf8/0x234 fs/read_write.c:977
 __do_sys_writev fs/read_write.c:1050 [inline]
 __se_sys_writev fs/read_write.c:1047 [inline]
 __arm64_sys_writev+0x28/0x38 fs/read_write.c:1047
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
irq event stamp: 941
hardirqs last  enabled at (941): [<ffff80000c01c86c>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
hardirqs last  enabled at (941): [<ffff80000c01c86c>] _raw_spin_unlock_irq+0x3c/0x70 kernel/locking/spinlock.c:202
hardirqs last disabled at (940): [<ffff80000c01c66c>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline]
hardirqs last disabled at (940): [<ffff80000c01c66c>] _raw_spin_lock_irq+0x34/0x9c kernel/locking/spinlock.c:170
softirqs last  enabled at (744): [<ffff80000801c38c>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (742): [<ffff80000801c358>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/12 12:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 3ead01ad .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in hugetlb_no_page
* Struck through repros no longer work on HEAD.