From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] virtio-9p: Return ENOSYS for unhandled requests.
Date: Sat, 2 Apr 2011 01:31:40 +0900 [thread overview]
Message-ID: <20110401163141.0C24515C039@msa104.auone-net.jp> (raw)
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
reply other threads:[~2011-04-01 16:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110401163141.0C24515C039@msa104.auone-net.jp \
--to=slash@ac.auone-net.jp \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).