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:
parent
8a8be1b8c3
commit
5be0039ce9
16 changed files with 194 additions and 28 deletions
3
kalloc.c
3
kalloc.c
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue