From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Martin Kletzander <mkletzan@redhat.com>,
Michael Tokarev <mjt@tls.msk.ru>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu segfauls with spiceport chardev and isa-serial
Date: Wed, 5 Feb 2014 09:35:53 +0000 [thread overview]
Message-ID: <20140205093552.GB2398@work-vm> (raw)
In-Reply-To: <CAEgOgz7kCuxhYKguwwY8qp=PEkPyH6ixh_HHmjb9F219QjYHRA@mail.gmail.com>
* Peter Crosthwaite (peter.crosthwaite@xilinx.com) wrote:
> On Tue, Feb 4, 2014 at 4:45 AM, Dr. David Alan Gilbert
> <dgilbert@redhat.com> wrote:
> > (cc'ing in Peter Crosthwaite and Michael Tokarev due to a serial fifo change
> > - see below!)
> >
> > * Martin Kletzander (mkletzan@redhat.com) wrote:
> >> Hello,
> >
> > Hi Martin,
> > I don't know about your spice warnings that triggered this but looking
> > down the backtrace I can see something odd:
> >
> >> current HEAD (2f61120c10da9128357510debc8e66880cd2bfdc) segfaults when
> >> I'm trying to do the following:
> >>
> >> I add this to qemu's command-line:
> >>
> >> -chardev spiceport,id=charserial0,name=org.qemu.console.serial.0 \
> >> -device isa-serial,chardev=charserial0,id=serial0
<snip>
> Hi Dave,
>
> Yes that does looks suss. My bad. Can you confirm your theory by
> making the proposed change? does it fix the bug?
>
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -225,7 +225,7 @@ static gboolean serial_xmit(GIOChannel *chan,
> GIOCondition cond, void
>
> if (s->tsr_retry <= 0) {
> if (s->fcr & UART_FCR_FE) {
> - s->tsr = fifo8_is_full(&s->xmit_fifo) ?
> + s->tsr = fifo8_is_empty(&s->xmit_fifo) ?
> 0 : fifo8_pop(&s->xmit_fifo);
> if (!s->xmit_fifo.num) {
> s->lsr |= UART_LSR_THRE;
Yep, seems reasonable; and Martin says it stops the seg;
I wonder if there are any serial tests out there - The other
failure mode this could have caused is the replacing of chunks
of outbound data by \0's if the fifo was full.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2014-02-05 10:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 16:04 [Qemu-devel] qemu segfauls with spiceport chardev and isa-serial Martin Kletzander
2014-02-03 18:45 ` Dr. David Alan Gilbert
2014-02-04 1:40 ` Peter Crosthwaite
2014-02-04 6:05 ` Martin Kletzander
2014-02-05 10:43 ` Martin Kletzander
2014-02-05 9:35 ` Dr. David Alan Gilbert [this message]
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=20140205093552.GB2398@work-vm \
--to=dgilbert@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mkletzan@redhat.com \
--cc=peter.crosthwaite@xilinx.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).