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

Martin Kletzander mkletzan at redhat.com
Fri Dec 12 04:37:01 UTC 2014


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 at redhat.com>
>---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141212/6e172b6c/attachment-0001.sig>


More information about the libvir-list mailing list