vhost_net: poll vhost queue after marking DMA is done
authorJason Wang <jasowang@redhat.com>
Mon, 2 Sep 2013 08:41:00 +0000 (16:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 13:54:56 +0000 (06:54 -0700)
commitbd35c1a7f659dfa01179e456881285a9f057d30c
tree7791a1129e0cde18db6a52ae71e232fd8b0a95d6
parent84a38c47c2bbcb361caa1631c92eaf5916e178d6
vhost_net: poll vhost queue after marking DMA is done

[ Upstream commit 19c73b3e08d16ee923f3962df4abf6205127896a ]

We used to poll vhost queue before making DMA is done, this is racy if vhost
thread were waked up before marking DMA is done which can result the signal to
be missed. Fix this by always polling the vhost thread before DMA is done.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/net.c