qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-9p: Return ENOSYS for unhandled requests.
@ 2011-04-01 16:31 Kusanagi Kouichi
  0 siblings, 0 replies; only message in thread
From: Kusanagi Kouichi @ 2011-04-01 16:31 UTC (permalink / raw)
  To: qemu-devel

Linux 2.6.39-rc1 guest causes qemu to abort when it sync or umount
a rw 9p mount.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 hw/virtio-9p.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 7c59988..03cd957 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -3597,9 +3597,11 @@ static void submit_pdu(V9fsState *s, V9fsPDU *pdu)
     BUG_ON(pdu->id >= ARRAY_SIZE(pdu_handlers));
 
     handler = pdu_handlers[pdu->id];
-    BUG_ON(handler == NULL);
-
-    handler(s, pdu);
+    if (handler == NULL) {
+        complete_pdu(s, pdu, ENOSYS);
+    } else {
+        handler(s, pdu);
+    }
 }
 
 static void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-01 16:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 16:31 [Qemu-devel] [PATCH] virtio-9p: Return ENOSYS for unhandled requests Kusanagi Kouichi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).