Re: [PATCHv2 2/4] openvz: support file system quota reporting

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

 



On 05/11/2012 03:14 PM, Guido Günther wrote:
> ---
>  src/openvz/openvz_conf.c                        |   16 ++++++++++++++++
>  tests/domainschemadata/domain-openvz-simple.xml |    2 ++
>  2 files changed, 18 insertions(+)
> 

>  
> +    param = "DISKSPACE";
> +    ret = openvzReadVPSConfigParam(veid, param, &temp);
> +    if (ret > 0) {
> +        if (openvzParseBarrierLimit(temp, &barrier, &limit)) {
> +            openvzError(VIR_ERR_INTERNAL_ERROR,
> +                        _("Could not read '%s' from config for container %d"),
> +                        param, veid);
> +            goto error;
> +        } else {
> +            fs->space_soft_limit = barrier * 1024; /* unit is bytes */
> +            fs->space_hard_limit = limit * 1024;   /* unit is bytes */

Is there any risk of this overflowing if there is an invalid config file?

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP 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]