Message ID | 1624591502-4827-1-git-send-email-neeraju@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | [v2] vringh: Use wiov->used to check for read/write desc order | expand |
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c index 4af8fa2..14e2043 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -359,7 +359,7 @@ __vringh_iov(struct vringh *vrh, u16 i, iov = wiov; else { iov = riov; - if (unlikely(wiov && wiov->i)) { + if (unlikely(wiov && wiov->used)) { vringh_bad("Readable desc %p after writable", &descs[i]); err = -EINVAL;