* [PULL for-6.1 0/1] hw/nvme fixes
@ 2021-08-09 10:56 Klaus Jensen
2021-08-09 10:56 ` [PULL for-6.1 1/1] hw/nvme: fix missing variable initializers Klaus Jensen
2021-08-09 16:04 ` [PULL for-6.1 0/1] hw/nvme fixes Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Klaus Jensen @ 2021-08-09 10:56 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Klaus Jensen, Keith Busch, qemu-block, Klaus Jensen
From: Klaus Jensen <k.jensen@samsung.com>
Hi Peter,
The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d:
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-08-06 10:28:33 +0100)
are available in the Git repository at:
git://git.infradead.org/qemu-nvme.git tags/nvme-next-pull-request
for you to fetch changes up to 5f4884c4412318a1adc105dea9cc28f7625ce730:
hw/nvme: fix missing variable initializers (2021-08-09 12:52:16 +0200)
----------------------------------------------------------------
hw/nvme fixes
* coverity fixes
----------------------------------------------------------------
Klaus Jensen (1):
hw/nvme: fix missing variable initializers
hw/nvme/ctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL for-6.1 1/1] hw/nvme: fix missing variable initializers
2021-08-09 10:56 [PULL for-6.1 0/1] hw/nvme fixes Klaus Jensen
@ 2021-08-09 10:56 ` Klaus Jensen
2021-08-09 16:04 ` [PULL for-6.1 0/1] hw/nvme fixes Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Klaus Jensen @ 2021-08-09 10:56 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Klaus Jensen, Keith Busch, Philippe Mathieu-Daudé,
qemu-block, Klaus Jensen
From: Klaus Jensen <k.jensen@samsung.com>
Coverity found that 'uuid', 'csi' and 'eui64' are uninitialized. While
we set most of the fields, we do not explicitly set the rsvd2 field in
the NvmeIdNsDescr header.
Fix this by explicitly zero-initializing the variables.
Reported-by: Coverity (CID 1458835, 1459295 and 1459580)
Fixes: 6870cfb8140d ("hw/nvme: namespace parameter for EUI-64")
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/nvme/ctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 43dfaeac9f54..6baf9e0420d5 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -4663,15 +4663,15 @@ static uint16_t nvme_identify_ns_descr_list(NvmeCtrl *n, NvmeRequest *req)
struct {
NvmeIdNsDescr hdr;
uint8_t v[NVME_NIDL_UUID];
- } QEMU_PACKED uuid;
+ } QEMU_PACKED uuid = {};
struct {
NvmeIdNsDescr hdr;
uint64_t v;
- } QEMU_PACKED eui64;
+ } QEMU_PACKED eui64 = {};
struct {
NvmeIdNsDescr hdr;
uint8_t v;
- } QEMU_PACKED csi;
+ } QEMU_PACKED csi = {};
trace_pci_nvme_identify_ns_descr_list(nsid);
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PULL for-6.1 0/1] hw/nvme fixes
2021-08-09 10:56 [PULL for-6.1 0/1] hw/nvme fixes Klaus Jensen
2021-08-09 10:56 ` [PULL for-6.1 1/1] hw/nvme: fix missing variable initializers Klaus Jensen
@ 2021-08-09 16:04 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2021-08-09 16:04 UTC (permalink / raw)
To: Klaus Jensen; +Cc: Keith Busch, Klaus Jensen, QEMU Developers, Qemu-block
On Mon, 9 Aug 2021 at 11:56, Klaus Jensen <its@irrelevant.dk> wrote:
>
> From: Klaus Jensen <k.jensen@samsung.com>
>
> Hi Peter,
>
> The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d:
>
> Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-08-06 10:28:33 +0100)
>
> are available in the Git repository at:
>
> git://git.infradead.org/qemu-nvme.git tags/nvme-next-pull-request
>
> for you to fetch changes up to 5f4884c4412318a1adc105dea9cc28f7625ce730:
>
> hw/nvme: fix missing variable initializers (2021-08-09 12:52:16 +0200)
>
> ----------------------------------------------------------------
> hw/nvme fixes
>
> * coverity fixes
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-09 16:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-09 10:56 [PULL for-6.1 0/1] hw/nvme fixes Klaus Jensen
2021-08-09 10:56 ` [PULL for-6.1 1/1] hw/nvme: fix missing variable initializers Klaus Jensen
2021-08-09 16:04 ` [PULL for-6.1 0/1] hw/nvme fixes Peter Maydell
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).