All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs
Date: Fri, 30 Apr 2010 15:50:15 +0200	[thread overview]
Message-ID: <m3iq79f3s8.fsf@trasno.mitica> (raw)
In-Reply-To: <1272626035-14416-1-git-send-email-amit.shah@redhat.com> (Amit Shah's message of "Fri, 30 Apr 2010 16:43:55 +0530")

Amit Shah <amit.shah@redhat.com> 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>

reviewed-by: Juan Quintela <quintela@redhat.com>

> ---
>  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);
>  }

  reply	other threads:[~2010-04-30 13:50 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 ` Juan Quintela [this message]
2010-05-03 17:14 ` Anthony Liguori

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=m3iq79f3s8.fsf@trasno.mitica \
    --to=quintela@redhat.com \
    --cc=amit.shah@redhat.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 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.