projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
741f21e
)
lguest: fix bug in setting guest GDT entry
author
Rusty Russell
<
[email protected]
>
Mon, 4 Jan 2010 08:56:14 +0000
(19:26 +1030)
committer
Linus Torvalds
<
[email protected]
>
Mon, 4 Jan 2010 20:33:33 +0000
(12:33 -0800)
We kill the guest, but then we blatt random stuff.
Reported-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Rusty Russell <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/lguest/segments.c
patch
|
blob
|
history
diff --git
a/drivers/lguest/segments.c
b/drivers/lguest/segments.c
index 951c57b0a7e075a9d927193d3c54d46ccb682545..ede46581351a04d9a635aee91bec38d69c67c76f 100644
(file)
--- 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)
* We assume the Guest has the same number of GDT entries as the
* Host, otherwise we'd have to dynamically allocate the Guest GDT.
*/
- if (num >= ARRAY_SIZE(cpu->arch.gdt))
+ if (num >= ARRAY_SIZE(cpu->arch.gdt))
{
kill_guest(cpu, "too many gdt entries %i", num);
+ return;
+ }
/* Set it up, then fix it. */
cpu->arch.gdt[num].a = lo;