From: Boris Ostrovsky <boris.ostrovsky@amd.com>
To: xen-devel@lists.xensource.com
Cc: boris.ostrovsky@amd.com
Subject: [PATCH] acpi: Make sure valid CPU is passed to do_pm_op()
Date: Tue, 14 Aug 2012 18:37:57 +0200 [thread overview]
Message-ID: <4ebf248d3aa1423da340.1344962277@localhost.localdomain> (raw)
# 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];
next reply other threads:[~2012-08-14 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 16:37 Boris Ostrovsky [this message]
2012-08-14 16:55 ` [PATCH] acpi: Make sure valid CPU is passed to do_pm_op() Jan Beulich
2012-08-14 17:04 ` Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ebf248d3aa1423da340.1344962277@localhost.localdomain \
--to=boris.ostrovsky@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).