linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: syzbot <syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux@dominikbrodowski.net, mpm@selenic.com, mst <mst@redhat.com>,
	syzkaller-bugs@googlegroups.com,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	yuehaibing@huawei.com
Subject: Re: [syzbot] INFO: task hung in add_early_randomness (2)
Date: Wed, 8 Jun 2022 10:35:36 +0800	[thread overview]
Message-ID: <CACGkMEt_e59wRotUo9D1UqubAhe+txy0GF=r1BYBVdND8-uKbA@mail.gmail.com> (raw)
In-Reply-To: <000000000000a09fc105e0e5bedb@google.com>

On Wed, Jun 8, 2022 at 9:37 AM syzbot
<syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot has tested the proposed patch but the reproducer is still triggering an issue:
> INFO: task hung in add_early_randomness
>

Ok, looking at virtio-rng.c, probe_common() tries to kick the
virtqueue before DRIVER_OK which is kind of violates the spec.

Please test the following patch:

#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next

diff --git a/drivers/char/hw_random/virtio-rng.c
b/drivers/char/hw_random/virtio-rng.c
index e856df7e285c..a6f3a8a2aca6 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -159,6 +159,8 @@ static int probe_common(struct virtio_device *vdev)
                goto err_find;
        }

+       virtio_device_ready(vdev);
+
        /* we always have a pending entropy request */
        request_entropy(vi);


  reply	other threads:[~2022-06-08  4:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03  6:49 [syzbot] INFO: task hung in add_early_randomness (2) syzbot
2022-06-07  1:50 ` syzbot
2022-06-07  7:30 ` syzbot
2022-06-07  9:05   ` Jason Wang
2022-06-07 10:35     ` Michael S. Tsirkin
2022-06-07 10:53     ` Michael S. Tsirkin
2022-06-08  1:19       ` Jason Wang
2022-06-08  1:37         ` syzbot
2022-06-08  2:35           ` Jason Wang [this message]
2022-06-08  2:37             ` syzbot
2022-06-08  2:50               ` Jason Wang
2022-06-08  2:51                 ` syzbot
2022-06-08  2:56                   ` Jason Wang
2022-06-08  3:15                     ` syzbot
2022-06-08  6:07                       ` 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='CACGkMEt_e59wRotUo9D1UqubAhe+txy0GF=r1BYBVdND8-uKbA@mail.gmail.com' \
    --to=jasowang@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mpm@selenic.com \
    --cc=mst@redhat.com \
    --cc=syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yuehaibing@huawei.com \
    /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).