xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi: Make sure valid CPU is passed to do_pm_op()
@ 2012-08-14 16:37 Boris Ostrovsky
  2012-08-14 16:55 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2012-08-14 16:37 UTC (permalink / raw)
  To: xen-devel; +Cc: boris.ostrovsky

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1344962129 -7200
# Node ID 4ebf248d3aa1423da340d6900dd5f21072e519b3
# Parent  33d596f46521ea852e90cf6dbdbf3680d104134c
acpi: Make sure valid CPU is passed to do_pm_op()

Passing invalid CPU value to do_pm_op() will cause assertion
in cpu_online().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>

diff -r 33d596f46521 -r 4ebf248d3aa1 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Mon Aug 13 18:09:33 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Tue Aug 14 18:35:29 2012 +0200
@@ -419,7 +419,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op
     int ret = 0;
     const struct processor_pminfo *pmpt;
 
-    if ( !op || !cpu_online(op->cpuid) )
+    if ( !op || op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) )
         return -EINVAL;
     pmpt = processor_pminfo[op->cpuid];

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-14 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 16:37 [PATCH] acpi: Make sure valid CPU is passed to do_pm_op() Boris Ostrovsky
2012-08-14 16:55 ` Jan Beulich
2012-08-14 17:04   ` Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).