aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/lguest/segments.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/lguest/segments.c b/drivers/lguest/segments.c
index 951c57b0a7e0..ede46581351a 100644
--- a/drivers/lguest/segments.c
+++ b/drivers/lguest/segments.c
@@ -179,8 +179,10 @@ void load_guest_gdt_entry(struct lg_cpu *cpu, u32 num, u32 lo, u32 hi)
179 * We assume the Guest has the same number of GDT entries as the 179 * We assume the Guest has the same number of GDT entries as the
180 * Host, otherwise we'd have to dynamically allocate the Guest GDT. 180 * Host, otherwise we'd have to dynamically allocate the Guest GDT.
181 */ 181 */
182 if (num >= ARRAY_SIZE(cpu->arch.gdt)) 182 if (num >= ARRAY_SIZE(cpu->arch.gdt)) {
183 kill_guest(cpu, "too many gdt entries %i", num); 183 kill_guest(cpu, "too many gdt entries %i", num);
184 return;
185 }
184 186
185 /* Set it up, then fix it. */ 187 /* Set it up, then fix it. */
186 cpu->arch.gdt[num].a = lo; 188 cpu->arch.gdt[num].a = lo;