Re: [PATCH] cpu_ppc64: Error out when model tag missing in virsh cpu-compare xml

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

 



On Mon, Sep 18, 2017 at 22:27:52 +0530, Nitesh Konkar wrote:
> libvirtd throws unhandled signal 11 on ppc while running
> virsh cpu-compare with missing model tag in the xml. This
> patch errors out in such situation.
> 
> Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
> ---
>  src/cpu/cpu_ppc64.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c
> index b58e80a..c11ac9f 100644
> --- a/src/cpu/cpu_ppc64.c
> +++ b/src/cpu/cpu_ppc64.c
> @@ -247,6 +247,12 @@ ppc64ModelFromCPU(const virCPUDef *cpu,
>  {
>      struct ppc64_model *model;
>  
> +    if (!cpu->model) {
> +        virReportError(VIR_ERR_INVALID_ARG, "%s",
> +                       _("no guest CPU model specified"));
> +        return NULL;
> +    }
> +
>      if (!(model = ppc64ModelFind(map, cpu->model))) {
>          virReportError(VIR_ERR_INTERNAL_ERROR,
>                         _("Unknown CPU model %s"), cpu->model);

ACK and pushed with the removal of "guest" in the error message as
suggested by John.

Thanks,

Jirka

--
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]
  Powered by Linux