[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <f1705194dfd581fb83ec26b32626dc4ddf6039f2.1541300643.git.luto@kernel.org>
Date: Sat, 3 Nov 2018 20:04:28 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: linux-kernel@...r.kernel.org, linux-fs@...r.kernel.org,
Andy Lutomirski <luto@...nel.org>,
David Howells <dhowells@...hat.com>
Subject: [PATCH] net/9p: Fix iov_iter usage
Trying to use 9pfs causes QEMU to complain:
qemu-system-x86_64: virtio: bogus descriptor or out of resources
This happens because 9p was broken by the iov_iter refactoring because
a ! got lost. Put it back. The offending hunk was:
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 7728b0acde09..4d7d2070e9c8 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -322,7 +322,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
if (!iov_iter_count(data))
return 0;
- if (!(data->type & ITER_KVEC)) {
+ if (iov_iter_is_kvec(data)) {
Cc: David Howells <dhowells@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Fixes: 00e23707442a ("iov_iter: Use accessor function")
Signed-off-by: Andy Lutomirski <luto@...nel.org>
---
net/9p/trans_virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 91981970f542..b1d39cabf125 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -329,7 +329,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
if (!iov_iter_count(data))
return 0;
- if (iov_iter_is_kvec(data)) {
+ if (!iov_iter_is_kvec(data)) {
int n;
/*
* We allow only p9_max_pages pinned. We wait for the
--
2.17.2
Powered by blists - more mailing lists