All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Saravanakumar <saravanakumar.punith@gmail.com>,  qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-trivial] [PATCH] pci: move dereferencing of root only after verifying valid root pointer.
Date: Thu, 22 May 2014 14:47:59 +0200	[thread overview]
Message-ID: <537DF1FF.3000101@redhat.com> (raw)
In-Reply-To: <1400758430-32697-1-git-send-email-saravanakumar.punith@gmail.com>

Il 22/05/2014 13:33, Saravanakumar ha scritto:
> Move dereferencing of root only after verifying valid root pointer.
>
>
> Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com>
> ---
>  hw/pci/pci.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 22fe5ee..8d6a8d4 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -605,13 +605,13 @@ PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char *devaddr)
>      int dom, bus;
>      unsigned slot;
>
> -    assert(!root->parent_dev);
> -
>      if (!root) {
>          fprintf(stderr, "No primary PCI bus\n");
>          return NULL;
>      }
>
> +    assert(!root->parent_dev);
> +
>      if (!devaddr) {
>          *devfnp = -1;
>          return pci_find_bus_nr(root, 0);
>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>


WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Saravanakumar <saravanakumar.punith@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] pci: move dereferencing of root only after verifying valid root pointer.
Date: Thu, 22 May 2014 14:47:59 +0200	[thread overview]
Message-ID: <537DF1FF.3000101@redhat.com> (raw)
In-Reply-To: <1400758430-32697-1-git-send-email-saravanakumar.punith@gmail.com>

Il 22/05/2014 13:33, Saravanakumar ha scritto:
> Move dereferencing of root only after verifying valid root pointer.
>
>
> Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com>
> ---
>  hw/pci/pci.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 22fe5ee..8d6a8d4 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -605,13 +605,13 @@ PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char *devaddr)
>      int dom, bus;
>      unsigned slot;
>
> -    assert(!root->parent_dev);
> -
>      if (!root) {
>          fprintf(stderr, "No primary PCI bus\n");
>          return NULL;
>      }
>
> +    assert(!root->parent_dev);
> +
>      if (!devaddr) {
>          *devfnp = -1;
>          return pci_find_bus_nr(root, 0);
>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  parent reply	other threads:[~2014-05-22 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 11:33 [Qemu-trivial] [PATCH] pci: move dereferencing of root only after verifying valid root pointer Saravanakumar
2014-05-22 11:33 ` [Qemu-devel] " Saravanakumar
2014-05-22 12:43 ` [Qemu-trivial] " Andreas Färber
2014-05-22 12:43   ` Andreas Färber
2014-05-22 12:47 ` Paolo Bonzini [this message]
2014-05-22 12:47   ` Paolo Bonzini
2014-05-23 20:09 ` [Qemu-trivial] " Michael Tokarev
2014-05-23 20:09   ` [Qemu-devel] " Michael Tokarev

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=537DF1FF.3000101@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=saravanakumar.punith@gmail.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.