[PATCH net v3] virtio_net: fix virtnet_open and virtnet_probe competing for try_fill_recv

2016-05-30 Thread Yunjian Wang
In function virtnet_open() and virtnet_probe(), func try_fill_recv() may be executed at the same time. VQ in virtqueue_add() has not been protected well and BUG_ON will be triggered when virito_net.ko being removed. Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> Acked-by: Jason Wang

[PATCH net] vhost_net: don't continue to call the recvmsg when meet errors

2016-11-30 Thread Yunjian Wang
When we meet an error(err=-EBADFD) recvmsg, the error handling in vhost handle_rx() will continue. This will cause a soft CPU lockup in vhost thread. Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> --- drivers/vhost/net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers