* [Qemu-trivial] [PATCH v2] Don't crash on keyboard input with no handler
@ 2013-11-19 20:01 ` Don Koch
0 siblings, 0 replies; 4+ messages in thread
From: Don Koch @ 2013-11-19 20:01 UTC (permalink / raw)
To: qemu-devel, qemu-trivial, Anthony Liguori
Prevent a call to put_kbd if null.
On shutdown of some OSes, the keyboard handler goes away before the
system is down. If a key is typed during this window, qemu crashes.
Signed-off-by: Don Koch <dkoch@verizon.com>
---
v2: punt printf()
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/ui/input.c b/ui/input.c
index 10d8c05..1c70f60 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -414,7 +414,7 @@ void kbd_put_keycode(int keycode)
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
return;
}
- if (entry) {
+ if (entry && entry->put_kbd) {
entry->put_kbd(entry->opaque, keycode);
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH v2] Don't crash on keyboard input with no handler
@ 2013-11-19 20:01 ` Don Koch
0 siblings, 0 replies; 4+ messages in thread
From: Don Koch @ 2013-11-19 20:01 UTC (permalink / raw)
To: qemu-devel, qemu-trivial, Anthony Liguori
Prevent a call to put_kbd if null.
On shutdown of some OSes, the keyboard handler goes away before the
system is down. If a key is typed during this window, qemu crashes.
Signed-off-by: Don Koch <dkoch@verizon.com>
---
v2: punt printf()
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/ui/input.c b/ui/input.c
index 10d8c05..1c70f60 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -414,7 +414,7 @@ void kbd_put_keycode(int keycode)
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
return;
}
- if (entry) {
+ if (entry && entry->put_kbd) {
entry->put_kbd(entry->opaque, keycode);
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-trivial] [PATCH v2] Don't crash on keyboard input with no handler
2013-11-19 20:01 ` [Qemu-devel] " Don Koch
@ 2013-12-02 17:18 ` Michael Tokarev
-1 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2013-12-02 17:18 UTC (permalink / raw)
To: Don Koch; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
20.11.2013 00:01, Don Koch wrote:
> Prevent a call to put_kbd if null.
>
> On shutdown of some OSes, the keyboard handler goes away before the
> system is down. If a key is typed during this window, qemu crashes.
Thanks, applied to the trivial patches queue.
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] Don't crash on keyboard input with no handler
@ 2013-12-02 17:18 ` Michael Tokarev
0 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2013-12-02 17:18 UTC (permalink / raw)
To: Don Koch; +Cc: qemu-trivial, qemu-devel, Anthony Liguori
20.11.2013 00:01, Don Koch wrote:
> Prevent a call to put_kbd if null.
>
> On shutdown of some OSes, the keyboard handler goes away before the
> system is down. If a key is typed during this window, qemu crashes.
Thanks, applied to the trivial patches queue.
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-02 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 20:01 [Qemu-trivial] [PATCH v2] Don't crash on keyboard input with no handler Don Koch
2013-11-19 20:01 ` [Qemu-devel] " Don Koch
2013-12-02 17:18 ` [Qemu-trivial] " Michael Tokarev
2013-12-02 17:18 ` [Qemu-devel] " Michael Tokarev
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.