All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+7f073540b1384a614e09@syzkaller.appspotmail.com>
To: jasowang@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, mst@redhat.com,
	netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	virtualization@lists.linux-foundation.org
Subject: possible deadlock in handle_rx
Date: Sun, 25 Mar 2018 17:01:03 -0700	[thread overview]
Message-ID: <001a113fe6d043b2a605684578f4@google.com> (raw)

Hello,

syzbot hit the following crash on upstream commit
cb6416592bc2a8b731dabcec0d63cda270764fc6 (Sun Mar 25 17:45:10 2018 +0000)
Merge tag 'dmaengine-fix-4.16-rc7' of  
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma
syzbot dashboard link:  
https://syzkaller.appspot.com/bug?extid=7f073540b1384a614e09

So far this crash happened 4 times on upstream.
C reproducer: https://syzkaller.appspot.com/x/repro.c?id=6506789075943424
syzkaller reproducer:  
https://syzkaller.appspot.com/x/repro.syz?id=5716250550337536
Raw console output:  
https://syzkaller.appspot.com/x/log.txt?id=5142038655795200
Kernel config:  
https://syzkaller.appspot.com/x/.config?id=-5034017172441945317
compiler: gcc (GCC) 7.1.1 20170620

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+7f073540b1384a614e09@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for  
details.
If you forward the report, please keep this part and the footer.


============================================
WARNING: possible recursive locking detected
4.16.0-rc6+ #366 Not tainted
--------------------------------------------
vhost-4248/4760 is trying to acquire lock:
  (&vq->mutex){+.+.}, at: [<000000003482bddc>] vhost_net_rx_peek_head_len  
drivers/vhost/net.c:633 [inline]
  (&vq->mutex){+.+.}, at: [<000000003482bddc>] handle_rx+0xeb1/0x19c0  
drivers/vhost/net.c:784

but task is already holding lock:
  (&vq->mutex){+.+.}, at: [<000000004de72f44>] handle_rx+0x1f5/0x19c0  
drivers/vhost/net.c:766

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

        CPU0
        ----
   lock(&vq->mutex);
   lock(&vq->mutex);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

1 lock held by vhost-4248/4760:
  #0:  (&vq->mutex){+.+.}, at: [<000000004de72f44>] handle_rx+0x1f5/0x19c0  
drivers/vhost/net.c:766

stack backtrace:
CPU: 0 PID: 4760 Comm: vhost-4248 Not tainted 4.16.0-rc6+ #366
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  __dump_stack lib/dump_stack.c:17 [inline]
  dump_stack+0x194/0x24d lib/dump_stack.c:53
  print_deadlock_bug kernel/locking/lockdep.c:1761 [inline]
  check_deadlock kernel/locking/lockdep.c:1805 [inline]
  validate_chain kernel/locking/lockdep.c:2401 [inline]
  __lock_acquire+0xe8f/0x3e00 kernel/locking/lockdep.c:3431
  lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920
  __mutex_lock_common kernel/locking/mutex.c:756 [inline]
  __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893
  mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
  vhost_net_rx_peek_head_len drivers/vhost/net.c:633 [inline]
  handle_rx+0xeb1/0x19c0 drivers/vhost/net.c:784
  handle_rx_net+0x19/0x20 drivers/vhost/net.c:910
  vhost_worker+0x268/0x470 drivers/vhost/vhost.c:361
  kthread+0x33c/0x400 kernel/kthread.c:238
  ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzkaller@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is  
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug  
report.
Note: all commands must start from beginning of the line in the email body.

             reply	other threads:[~2018-03-26  0:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  0:01 syzbot [this message]
2018-03-26  3:48 ` possible deadlock in handle_rx Jason Wang
2018-03-26  3:48 ` Jason Wang

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=001a113fe6d043b2a605684578f4@google.com \
    --to=syzbot+7f073540b1384a614e09@syzkaller.appspotmail.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.