qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Vladimir Senkov <hangup@gmail.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] copy&paste error in serial.c causes a crash when attempting to read from UART (if there is no data to be read)
Date: Mon, 17 Jun 2013 02:57:12 +0200	[thread overview]
Message-ID: <51BE5EE8.5070607@suse.de> (raw)
In-Reply-To: <CAEgEybqrZ50JD5jmf9ge2g1VgNB5XE4wLkfxvB6qBe89vjP8Zw@mail.gmail.com>

Am 17.06.2013 02:43, schrieb Vladimir Senkov:
> From 032bdc94c6369aa7b578182cdad8038ebb2b8cd1 Mon Sep 17 00:00:00 2001
> From: Vladimir Senkov <hangup@gmail.com <mailto:hangup@gmail.com>>
> Date: Sun, 16 Jun 2013 20:30:52 -0400
> Subject: [PATCH] fixed a copy&paste error in serial.c
> 
> Signed-off-by: Vladimir Senkov <hangup@gmail.com <mailto:hangup@gmail.com>>

Patch is HTML-damaged unfortunately, we recommend git-send-email:
http://wiki.qemu.org/Contribute/SubmitAPatch

But since the patch is so trivial, maybe Peter or Michael can fix it up?

Regards,
Andreas

> ---
>  hw/char/serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index b537e42..6382f98 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -424,7 +424,7 @@ static uint64_t serial_ioport_read(void *opaque,
> hwaddr addr, unsigned size)
>              ret = s->divider & 0xff;
>          } else {
>              if(s->fcr & UART_FCR_FE) {
> -                ret = fifo8_is_full(&s->recv_fifo) ?
> +                ret = fifo8_is_empty(&s->recv_fifo) ?
>                              0 : fifo8_pop(&s->recv_fifo);
>                  if (s->recv_fifo.num == 0) {
>                      s->lsr &= ~(UART_LSR_DR | UART_LSR_BI);
> --
> 1.8.1.2
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-06-17  0:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17  0:43 [Qemu-devel] copy&paste error in serial.c causes a crash when attempting to read from UART (if there is no data to be read) Vladimir Senkov
2013-06-17  0:57 ` Andreas Färber [this message]
2013-06-17  7:03   ` Paolo Bonzini
2013-06-17  7:16     ` Andreas Färber
2013-06-17  7:31       ` Peter Crosthwaite
2013-06-17  7:30   ` Peter Crosthwaite
2013-06-17  7:33 ` Peter Crosthwaite

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=51BE5EE8.5070607@suse.de \
    --to=afaerber@suse.de \
    --cc=hangup@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).