When fail, translate_desc() returns negative value, otherwise the
number of iovs. So we should fail when the return value is negative
instead of a blindly check against zero.
Reported-by: Stephen Hemminger
Fixes: cc5e71075947 ("vhost: log dirty page correctly")
Signed-off-by: Jason Wang
---
On Wed, Feb 13, 2019 at 02:44:14PM +0100, Cornelia Huck wrote:
> On Thu, 31 Jan 2019 10:27:53 -0500
> "Michael S. Tsirkin" wrote:
>
> > On Thu, Jan 31, 2019 at 01:53:14PM +0100, Cornelia Huck wrote:
> > > A virtio transport is free to implement some of the callbacks in
> > > virtio_config_ops in
On Thu, 31 Jan 2019 10:27:53 -0500
"Michael S. Tsirkin" wrote:
> On Thu, Jan 31, 2019 at 01:53:14PM +0100, Cornelia Huck wrote:
> > A virtio transport is free to implement some of the callbacks in
> > virtio_config_ops in a matter that they cannot be called from
> > atomic context (e.g.