Message ID | 1460047845-14488-12-git-send-email-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e7be21e..feaab08 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2208,6 +2208,10 @@ static void spapr_machine_device_plug(HotplugHandler *hotplug_dev, if (*errp) { return; } + if (node < 0 || node >= MAX_NODES) { + error_setg(errp, "Invaild node %d", node); + return; + } /* * Currently PowerPC kernel doesn't allow hot-adding memory to