* [PATCH] net/9p: Fix iov_iter usage
@ 2018-11-04 3:04 Andy Lutomirski
2018-11-04 3:24 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2018-11-04 3:04 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel, linux-fs, Andy Lutomirski, David Howells
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@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 00e23707442a ("iov_iter: Use accessor function")
Signed-off-by: Andy Lutomirski <luto@kernel.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/9p: Fix iov_iter usage
2018-11-04 3:04 [PATCH] net/9p: Fix iov_iter usage Andy Lutomirski
@ 2018-11-04 3:24 ` Al Viro
0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2018-11-04 3:24 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: linux-kernel, linux-fs, David Howells
On Sat, Nov 03, 2018 at 08:04:28PM -0700, Andy Lutomirski wrote:
> Trying to use 9pfs causes QEMU to complain:
commit 2cbfdf4df58330f6cb493500387427dae1c5551d
Author: Marc Zyngier <marc.zyngier@arm.com>
Date: Fri Nov 2 17:16:51 2018 +0000
iov_iter: Fix 9p virtio breakage
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-04 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04 3:04 [PATCH] net/9p: Fix iov_iter usage Andy Lutomirski
2018-11-04 3:24 ` Al Viro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.