From: Jan Kiszka <jan.kiszka@siemens.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] lsi: Fix value overflow in request tag processing
Date: Fri, 21 May 2010 18:44:59 +0200 [thread overview]
Message-ID: <4BF6B88B.4060008@siemens.com> (raw)
In-Reply-To: <4BF6B36A.8070702@aurel32.net>
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrong
patch version): We need to mask the tag value properly to obtain its
device ID.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/lsi53c895a.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 9d3c44d..f5a91ba 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -543,7 +543,7 @@ static void lsi_do_dma(LSIState *s, int out)
return;
}
- id = s->current->tag >> 8;
+ id = (s->current->tag >> 8) & 0xf;
dev = s->bus.devs[id];
if (!dev) {
lsi_bad_selection(s, id);
@@ -745,7 +745,7 @@ static void lsi_do_command(LSIState *s)
s->sfbr = buf[0];
s->command_complete = 0;
- id = s->select_tag >> 8;
+ id = (s->select_tag >> 8) & 0xf;
dev = s->bus.devs[id];
if (!dev) {
lsi_bad_selection(s, id);
--
1.6.0.2
next prev parent reply other threads:[~2010-05-21 16:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 15:49 [Qemu-devel] Re: lsi: Handle removal of selected devices Aurelien Jarno
2010-05-21 16:17 ` Aurelien Jarno
2010-05-21 16:18 ` Jan Kiszka
2010-05-21 16:23 ` Aurelien Jarno
2010-05-21 16:44 ` Jan Kiszka [this message]
2010-05-22 14:05 ` [Qemu-devel] [PATCH] lsi: Fix value overflow in request tag processing Aurelien Jarno
2010-05-21 16:23 ` [Qemu-devel] Re: lsi: Handle removal of selected devices Jan Kiszka
2010-05-21 16:25 ` Jan Kiszka
2010-05-21 16:17 ` Jan Kiszka
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=4BF6B88B.4060008@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aurelien@aurel32.net \
--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 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.