VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Neeraj Upadhyay <neeraju@codeaurora.org> 2021-06-25 08:55:02 +0530 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-09-03 10:23:01 +0200 commit: 2aef43ab6de1fb8f31cf0e84fcfa65b4e161554a parent: 839815ea5f1d936ad1cd2a6c8bd134990d7582df
Commit Summary:
vringh: Use wiov->used to check for read/write desc order
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 4af8fa259d65..14e2043d7685 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;