From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Eric Auger" <eric.auger@redhat.com>,
qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PATCH v2 1/2] hw/arm/smmu-common: a fix to smmu_find_smmu_pcibus
Date: Thu, 27 Feb 2020 08:51:10 +0100 [thread overview]
Message-ID: <20200227075111.15275-2-philmd@redhat.com> (raw)
In-Reply-To: <20200227075111.15275-1-philmd@redhat.com>
From: Eric Auger <eric.auger@redhat.com>
Make sure a null SMMUPciBus is returned in case we were
not able to identify a pci bus matching the @bus_num.
This matches the fix done on intel iommu in commit:
a2e1cd41ccfe796529abfd1b6aeb1dd4393762a2
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20200226172628.17449-1-eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/arm/smmu-common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index 0f2573f004..67d7b2d0fd 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -301,6 +301,7 @@ SMMUPciBus *smmu_find_smmu_pcibus(SMMUState *s, uint8_t bus_num)
return smmu_pci_bus;
}
}
+ smmu_pci_bus = NULL;
}
return smmu_pci_bus;
}
--
2.21.1
next prev parent reply other threads:[~2020-02-27 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 7:51 [PATCH v2 0/2] hw/arm/smmu-common: Avoid smmu_find_smmu_pcibus return dangling pointer Philippe Mathieu-Daudé
2020-02-27 7:51 ` Philippe Mathieu-Daudé [this message]
2020-02-27 7:51 ` [PATCH v2 2/2] hw/arm/smmu-common: Simplify smmu_find_smmu_pcibus() logic Philippe Mathieu-Daudé
2020-02-27 8:31 ` Auger Eric
2020-02-27 15:52 ` Peter Xu
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=20200227075111.15275-2-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=eric.auger@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-arm@nongnu.org \
--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.