netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Rusty Russell <rusty@rustcorp.com.au>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 0/2] virtio_net: fix race in RX VQ processing
Date: Tue, 09 Jul 2013 11:17:05 +0800	[thread overview]
Message-ID: <51DB80B1.60009@redhat.com> (raw)
In-Reply-To: <1373274069-4301-1-git-send-email-mst@redhat.com>

On 07/08/2013 05:05 PM, Michael S. Tsirkin wrote:
> Jason Wang reported a race in RX VQ processing:
> virtqueue_enable_cb is called outside napi lock,
> violating virtio serialization rules.
> The race has been there from day 1, but it got especially nasty in 3.0
> when commit a5c262c5fd83ece01bd649fb08416c501d4c59d7
> "virtio_ring: support event idx feature"
> added more dependency on vq state.
>
> Please review, and consider for 3.11 and for stable.
>
> Jason, could you please report whether this fixes the issues for you?

Yes, I confirm this fixes the issue.

Since I can only reproduce it by adding udelay in virtqueue_enable_cb()
after virtio_mb(). I validate this also with this.

Thanks

  parent reply	other threads:[~2013-07-09  3:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08  9:05 [PATCH 0/2] virtio_net: fix race in RX VQ processing Michael S. Tsirkin
2013-07-08  9:04 ` [PATCH 1/2] virtio: support unlocked queue poll Michael S. Tsirkin
2013-07-09  3:26   ` Jason Wang
2013-07-10  3:09   ` Rusty Russell
2013-07-10  4:38   ` Asias He
2013-07-08  9:04 ` [PATCH 2/2] virtio_net: fix race in RX VQ processing Michael S. Tsirkin
2013-07-08 12:52   ` Sergei Shtylyov
2013-07-08 13:08     ` Michael S. Tsirkin
2013-07-09  3:28   ` Jason Wang
2013-07-10  4:39     ` Asias He
2013-07-09  3:17 ` Jason Wang [this message]
2013-07-09  3:54 ` [PATCH 0/2] " David Miller

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=51DB80B1.60009@redhat.com \
    --to=jasowang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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).