qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] lsi: Fix value overflow in request tag processing
Date: Sat, 22 May 2010 16:05:47 +0200	[thread overview]
Message-ID: <20100522140547.GA5001@volta.aurel32.net> (raw)
In-Reply-To: <4BF6B88B.4060008@siemens.com>

On Fri, May 21, 2010 at 06:44:59PM +0200, Jan Kiszka wrote:
> 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>

Thanks for the quick patch, I have applied it.

> ---
>  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
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2010-05-22 14:06 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       ` [Qemu-devel] [PATCH] lsi: Fix value overflow in request tag processing Jan Kiszka
2010-05-22 14:05         ` Aurelien Jarno [this message]
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=20100522140547.GA5001@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=jan.kiszka@siemens.com \
    --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).