Re: [PATCH] conf: goto error when value max_sectors too large

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

 



On Fri, Dec 12, 2014 at 10:32:54AM +0800, Luyao Huang wrote:
Output error when we try to set a too large max_sectors.
Just like queues and cmd_per_lun here.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
src/conf/domain_conf.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2965d8d..d4ac301 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6681,6 +6681,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
    if (max_sectors && virStrToLong_ui(max_sectors, NULL, 10, &def->max_sectors) < 0) {
        virReportError(VIR_ERR_XML_ERROR,
                       _("Malformed 'max_sectors' value %s'"), max_sectors);
+        goto error;
    }

    if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
--
1.8.3.1


ACK and safe for freeze since this makes the controller disappear.
Will push in a while.

Martin

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]