* [Qemu-devel] [PATCH] esp: cancel current request only if some request is in flight
@ 2011-07-03 16:09 Hervé Poussineau
0 siblings, 0 replies; only message in thread
From: Hervé Poussineau @ 2011-07-03 16:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau
Some device may be selected, but it doesn't mean that a request is pending.
This fixes a possible crash of Qemu.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/esp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/esp.c b/hw/esp.c
index 8e95672..aa50800 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -219,7 +219,7 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf)
s->ti_rptr = 0;
s->ti_wptr = 0;
- if (s->current_dev) {
+ if (s->current_req) {
/* Started a new command before the old one finished. Cancel it. */
scsi_req_cancel(s->current_req);
s->async_len = 0;
--
1.7.5.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-03 16:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-03 16:09 [Qemu-devel] [PATCH] esp: cancel current request only if some request is in flight Hervé Poussineau
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).