interrupts could be recursive since lapic_eoi() called before rti

so fast interrupts overflow the kernel stack
fix: cli() before lapic_eoi()
This commit is contained in:
rtm 2006-08-10 22:08:14 +00:00
parent 8a8be1b8c3
commit 5be0039ce9
16 changed files with 194 additions and 28 deletions

View file

@ -15,7 +15,7 @@
#include "proc.h"
#include "spinlock.h"
struct spinlock kalloc_lock = { "kalloc" };
struct spinlock kalloc_lock;
struct run {
struct run *next;
@ -37,6 +37,7 @@ kinit(void)
uint mem;
char *start;
initlock(&kalloc_lock, "kalloc");
start = (char *) &end;
start = (char *) (((uint)start + PAGE) & ~(PAGE-1));
mem = 256; // XXX