syzbot


possible deadlock in do_page_fault

Status: auto-obsoleted due to no activity on 2022/08/26 20:46
Subsystems: mm fs
[Documentation on labels]
Reported-by: syzbot+f8181becdab66ab4b181@syzkaller.appspotmail.com
First crash: 969d, last: 969d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in do_page_fault 1 (2) 2022/04/29 06:50

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.17.0-rc1-syzkaller-00002-g0966d385830d #0 Not tainted
--------------------------------------------
dhcpcd-run-hook/3780 is trying to acquire lock:
ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline]
ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x24e/0xa3c arch/riscv/mm/fault.c:285

but task is already holding lock:
ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: setup_arg_pages+0x1aa/0x4b8 fs/exec.c:793

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&mm->mmap_lock);
  lock(&mm->mmap_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by dhcpcd-run-hook/3780:
 #0: ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
 #0: ffffaf8010608d18 (&mm->mmap_lock){++++}-{3:3}, at: setup_arg_pages+0x1aa/0x4b8 fs/exec.c:793

stack backtrace:
CPU: 1 PID: 3780 Comm: dhcpcd-run-hook Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0
Hardware name: riscv-virtio,qemu (DT)
Call Trace:
[<ffffffff8000a228>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113
[<ffffffff831668cc>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119
[<ffffffff831756ba>] __dump_stack lib/dump_stack.c:88 [inline]
[<ffffffff831756ba>] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106
[<ffffffff83175742>] dump_stack+0x1c/0x24 lib/dump_stack.c:113
[<ffffffff8011404e>] print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
[<ffffffff8011404e>] check_deadlock kernel/locking/lockdep.c:2999 [inline]
[<ffffffff8011404e>] validate_chain kernel/locking/lockdep.c:3788 [inline]
[<ffffffff8011404e>] __lock_acquire+0x1dcc/0x333e kernel/locking/lockdep.c:5027
[<ffffffff80116582>] lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5639
[<ffffffff8011682a>] lock_acquire+0x54/0x6a kernel/locking/lockdep.c:5612
[<ffffffff831ab656>] down_read+0x3c/0x54 kernel/locking/rwsem.c:1461
[<ffffffff800117d4>] mmap_read_lock include/linux/mmap_lock.h:117 [inline]
[<ffffffff800117d4>] do_page_fault+0x24e/0xa3c arch/riscv/mm/fault.c:285
[<ffffffff80005724>] ret_from_exception+0x0/0x10
[<ffffffff80c0069a>] __stack_depot_save+0x40/0x4b2 lib/stackdepot.c:360

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/28 20:46 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d e9076525 .config console log report info ci-qemu2-riscv64 possible deadlock in do_page_fault
* Struck through repros no longer work on HEAD.