2012-08-28 15:15:48 +00:00
|
|
|
From 34b7ca715ee45925b76fbeb23a24c16015adba33 Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <34b7ca715ee45925b76fbeb23a24c16015adba33.1346162949.git.crobinso@redhat.com>
|
|
|
|
In-Reply-To: <90a59d545ad6759c105b0bfcfca70f574482584f.1346162949.git.crobinso@redhat.com>
|
|
|
|
References: <90a59d545ad6759c105b0bfcfca70f574482584f.1346162949.git.crobinso@redhat.com>
|
2012-01-13 19:46:23 +00:00
|
|
|
From: Amit Shah <amit.shah@redhat.com>
|
|
|
|
Date: Fri, 2 Dec 2011 15:42:55 +0530
|
2012-08-28 15:15:48 +00:00
|
|
|
Subject: [PATCH 113/114] char: Disable write callback if throttled chardev is
|
2012-01-13 19:46:23 +00:00
|
|
|
detached
|
|
|
|
|
|
|
|
If a throttled chardev is detached from the frontend device, all future
|
|
|
|
callbacks should be suppressed. Not doing this results in a segfault.
|
|
|
|
|
|
|
|
Bugzilla: 745758
|
|
|
|
Upstream: Not applicable, since throttling is a RHEL6-only feature.
|
|
|
|
|
|
|
|
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
2012-08-28 15:15:48 +00:00
|
|
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
2012-01-13 19:46:23 +00:00
|
|
|
---
|
2012-08-06 19:53:39 +00:00
|
|
|
qemu-char.c | 5 +++++
|
2012-07-05 09:22:23 +00:00
|
|
|
1 file changed, 5 insertions(+)
|
2012-01-13 19:46:23 +00:00
|
|
|
|
|
|
|
diff --git a/qemu-char.c b/qemu-char.c
|
2012-08-28 15:15:48 +00:00
|
|
|
index d86ee88..9defbec 100644
|
2012-01-13 19:46:23 +00:00
|
|
|
--- a/qemu-char.c
|
|
|
|
+++ b/qemu-char.c
|
2012-07-05 09:22:23 +00:00
|
|
|
@@ -223,6 +223,11 @@ void qemu_chr_add_handlers(CharDriverState *s,
|
2012-01-13 19:46:23 +00:00
|
|
|
++s->avail_connections;
|
|
|
|
}
|
|
|
|
if (!handlers) {
|
|
|
|
+ if (s->write_blocked) {
|
|
|
|
+ /* Ensure we disable the callback if we were throttled */
|
|
|
|
+ s->chr_disable_write_fd_handler(s);
|
|
|
|
+ /* s->write_blocked is cleared below */
|
|
|
|
+ }
|
|
|
|
handlers = &null_handlers;
|
|
|
|
}
|
|
|
|
s->chr_can_read = handlers->fd_can_read;
|
|
|
|
--
|
2012-08-06 19:53:39 +00:00
|
|
|
1.7.11.2
|
2012-01-13 19:46:23 +00:00
|
|
|
|