diff options
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r-- | drivers/lguest/lguest_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 645e6e040bfb..4017701a1788 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
@@ -102,7 +102,7 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o) | |||
102 | static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip) | 102 | static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip) |
103 | { | 103 | { |
104 | /* We have a limited number the number of CPUs in the lguest struct. */ | 104 | /* We have a limited number the number of CPUs in the lguest struct. */ |
105 | if (id >= NR_CPUS) | 105 | if (id >= ARRAY_SIZE(cpu->lg->cpus)) |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | 107 | ||
108 | /* Set up this CPU's id, and pointer back to the lguest struct. */ | 108 | /* Set up this CPU's id, and pointer back to the lguest struct. */ |