summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2013-01-15 13:31:43 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-01-15 15:57:02 -0500
commite5c702d3b268066dc70d619ecff06a08065f343f (patch)
tree590b4745bce3d1be08163ff4feedc2de88a24f41 /drivers/xen
parentd0b4d64aadb9f4a90669848de9ef3819050a98cd (diff)
downloadblackbird-op-linux-e5c702d3b268066dc70d619ecff06a08065f343f.tar.gz
blackbird-op-linux-e5c702d3b268066dc70d619ecff06a08065f343f.zip
Xen: properly bound buffer access when parsing cpu/*/availability
At the same time reduce the local buffers to 16 bytes each. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/cpu_hotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
index 4dcfced107f5..084041d42c9a 100644
--- a/drivers/xen/cpu_hotplug.c
+++ b/drivers/xen/cpu_hotplug.c
@@ -25,10 +25,10 @@ static void disable_hotplug_cpu(int cpu)
static int vcpu_online(unsigned int cpu)
{
int err;
- char dir[32], state[32];
+ char dir[16], state[16];
sprintf(dir, "cpu/%u", cpu);
- err = xenbus_scanf(XBT_NIL, dir, "availability", "%s", state);
+ err = xenbus_scanf(XBT_NIL, dir, "availability", "%15s", state);
if (err != 1) {
if (!xen_initial_domain())
printk(KERN_ERR "XENBUS: Unable to read cpu state\n");
OpenPOWER on IntegriCloud