Skip to content

virtio_net: fix race in RX VQ processing

Michael S. Tsirkin lkml netdev virtualization 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Added Jason's Tested-by tag
- minor coding style fix

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio: support unlocked queue polldrivers/virtio/virtio_ring.c include/linux/virtio.h+48 -120 replies
1/2virtio: support unlocked queue polldrivers/virtio/virtio_ring.c include/linux/virtio.h+48 -120 replies
2/2virtio_net: fix race in RX VQ processingdrivers/net/virtio_net.c+3 -20 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJason Wang
1/2
1/2
2/2T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] virtio_net: fix race in RX VQ processing

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 stable.

Changes from v1:
- Added Jason's Tested-by tag
- minor coding style fix