From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs
Date: Mon, 03 May 2010 12:14:13 -0500 [thread overview]
Message-ID: <4BDF0465.30300@codemonkey.ws> (raw)
In-Reply-To: <1272626035-14416-1-git-send-email-amit.shah@redhat.com>
On 04/30/2010 06:13 AM, Amit Shah wrote:
> In the flush_queued_data() function, we expect port to be valid. Assert
> only for port and not port || discard.
>
> Reported-by: Juan Quintela<quintela@redhat.com>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/virtio-serial-bus.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 97694d5..3ce95e8 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
>
> static void flush_queued_data(VirtIOSerialPort *port, bool discard)
> {
> - assert(port || discard);
> + assert(port);
>
> do_flush_queued_data(port, port->ovq,&port->vser->vdev, discard);
> }
>
prev parent reply other threads:[~2010-05-03 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 11:13 [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs Amit Shah
2010-04-30 13:50 ` [Qemu-devel] " Juan Quintela
2010-05-03 17:14 ` Anthony Liguori [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=4BDF0465.30300@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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.