linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com>
To: airlied@linux.ie, akpm@linux-foundation.org, bhelgaas@google.com,
	 bskeggs@redhat.com, dan.j.williams@intel.com,
	daniel.vetter@ffwll.ch,  daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, jean-philippe@linaro.org,
	 jgg@ziepe.ca, jglisse@redhat.com, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org, logang@deltatee.com, mhocko@suse.com,
	 nouveau@lists.freedesktop.org, rcampbell@nvidia.com,
	sfr@canb.auug.org.au,  syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de
Subject: possible deadlock in __mmu_notifier_invalidate_range_end
Date: Fri, 06 Sep 2019 10:08:10 -0700	[thread overview]
Message-ID: <0000000000009611470591e57be6@google.com> (raw)

Hello,

syzbot found the following crash on:

HEAD commit:    6d028043 Add linux-next specific files for 20190830
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16cbf22a600000
kernel config:  https://syzkaller.appspot.com/x/.config?x=82a6bec43ab0cb69
dashboard link: https://syzkaller.appspot.com/bug?extid=aaedc50d99a03250fe1f
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15269876600000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12685092600000

The bug was bisected to:

commit e58b341134ca751d9c12bacded12a8b4dd51368d
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date:   Fri Aug 30 09:42:14 2019 +0000

     Merge remote-tracking branch 'hmm/hmm'

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=11ea65ea600000
final crash:    https://syzkaller.appspot.com/x/report.txt?x=13ea65ea600000
console output: https://syzkaller.appspot.com/x/log.txt?x=15ea65ea600000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com
Fixes: e58b341134ca ("Merge remote-tracking branch 'hmm/hmm'")

============================================
WARNING: possible recursive locking detected
5.3.0-rc6-next-20190830 #75 Not tainted
--------------------------------------------
oom_reaper/1065 is trying to acquire lock:
ffffffff8904ff60 (mmu_notifier_invalidate_range_start){+.+.}, at:  
__mmu_notifier_invalidate_range_end+0x0/0x360 mm/mmu_notifier.c:169

but task is already holding lock:
ffffffff8904ff60 (mmu_notifier_invalidate_range_start){+.+.}, at:  
__oom_reap_task_mm+0x196/0x490 mm/oom_kill.c:542

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

        CPU0
        ----
   lock(mmu_notifier_invalidate_range_start);
   lock(mmu_notifier_invalidate_range_start);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

2 locks held by oom_reaper/1065:
  #0: ffff888094ad3990 (&mm->mmap_sem#2){++++}, at: oom_reap_task_mm  
mm/oom_kill.c:570 [inline]
  #0: ffff888094ad3990 (&mm->mmap_sem#2){++++}, at: oom_reap_task  
mm/oom_kill.c:613 [inline]
  #0: ffff888094ad3990 (&mm->mmap_sem#2){++++}, at: oom_reaper+0x3a7/0x1320  
mm/oom_kill.c:651
  #1: ffffffff8904ff60 (mmu_notifier_invalidate_range_start){+.+.}, at:  
__oom_reap_task_mm+0x196/0x490 mm/oom_kill.c:542

stack backtrace:
CPU: 1 PID: 1065 Comm: oom_reaper Not tainted 5.3.0-rc6-next-20190830 #75
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x172/0x1f0 lib/dump_stack.c:113
  print_deadlock_bug kernel/locking/lockdep.c:2371 [inline]
  check_deadlock kernel/locking/lockdep.c:2412 [inline]
  validate_chain kernel/locking/lockdep.c:2955 [inline]
  __lock_acquire.cold+0x15d/0x385 kernel/locking/lockdep.c:3955
  lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487
  __mmu_notifier_invalidate_range_end+0x3c/0x360 mm/mmu_notifier.c:193
  mmu_notifier_invalidate_range_end include/linux/mmu_notifier.h:375 [inline]
  __oom_reap_task_mm+0x3fa/0x490 mm/oom_kill.c:552
  oom_reap_task_mm mm/oom_kill.c:589 [inline]
  oom_reap_task mm/oom_kill.c:613 [inline]
  oom_reaper+0x2b2/0x1320 mm/oom_kill.c:651
  kthread+0x361/0x430 kernel/kthread.c:255
  ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
oom_reaper: reaped process 10145 (syz-executor282), now anon-rss:16480kB,  
file-rss:872kB, shmem-rss:0kB
oom_reaper: reaped process 10144 (syz-executor282), now anon-rss:0kB,  
file-rss:0kB, shmem-rss:0kB
oom_reaper: reaped process 10158 (syz-executor282), now anon-rss:16824kB,  
file-rss:872kB, shmem-rss:0kB
oom_reaper: reaped process 10187 (syz-executor282), now anon-rss:0kB,  
file-rss:0kB, shmem-rss:0kB
oom_reaper: reaped process 10173 (syz-executor282), now anon-rss:0kB,  
file-rss:0kB, shmem-rss:0kB
oom_reaper: reaped process 10139 (syz-executor282), now anon-rss:0kB,  
file-rss:0kB, shmem-rss:0kB


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches


                 reply	other threads:[~2019-09-06 17:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000009611470591e57be6@google.com \
    --to=syzbot+aaedc50d99a03250fe1f@syzkaller.appspotmail.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=bskeggs@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jean-philippe@linaro.org \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=mhocko@suse.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rcampbell@nvidia.com \
    --cc=sfr@canb.auug.org.au \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).