[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 07/20] spapr: Add NVDIMM device support

From: Shivaprasad G Bhat
Subject: Re: [PULL 07/20] spapr: Add NVDIMM device support
Date: Wed, 26 Feb 2020 17:43:34 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/25/2020 03:30 PM, Peter Maydell wrote:
On Fri, 21 Feb 2020 at 03:37, David Gibson <address@hidden> wrote:
From: Shivaprasad G Bhat <address@hidden>

Add support for NVDIMM devices for sPAPR. Piggyback on existing nvdimm
device interface in QEMU to support virtual NVDIMM devices for Power.
+    }
+    uuidstr = object_property_get_str(OBJECT(nvdimm), NVDIMM_UUID_PROP, NULL);
+    qemu_uuid_parse(uuidstr, &uuid);
+    g_free(uuidstr);
+    if (qemu_uuid_is_null(&uuid)) {
+        error_setg(errp, "NVDIMM device requires the uuid to be set");
+        return;
+    }
Hi -- Coverity thinks (CID 1419883) that it's suspicious that
this code doesn't check the return value of qemu_uuid_parse(),
because we check it everywhere else that we call that function
(it can return a failure code if the UUID doesn't validly parse).
Hi Peter,

The nvdimm_set_uuid() already verifies if the uuid is valid or not. So, its safe
if we dont check here again.

I just posted a patch adding an assert here.

Thanks and Regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]