]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: fix race in RX VQ processing
authorDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2013 19:45:43 +0000 (12:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2013 19:45:43 +0000 (12:45 -0700)
commitd86b7434979782973f2e0a86f718816770877a63
tree6d63721222da5d652d2e4e65991a15007a83a520
parenta2f9ced94f8e0e9ab197725ef5136aba8f8e564b
parent5b1d74444f34522018ed830936bc387fb0aa568a
virtio_net: fix race in RX VQ processing

Michael S. Tsirkin says:

====================
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 a0202b604bfded62b5255bdd47dca1fa245a6836
"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
====================

Signed-off-by: David S. Miller <davem@davemloft.net>