From 5be0039ce9e22f140a29e167526c64c723c5be3c Mon Sep 17 00:00:00 2001 From: rtm Date: Thu, 10 Aug 2006 22:08:14 +0000 Subject: interrupts could be recursive since lapic_eoi() called before rti so fast interrupts overflow the kernel stack fix: cli() before lapic_eoi() --- bio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bio.c') diff --git a/bio.c b/bio.c index f847c2e..2b17a52 100644 --- a/bio.c +++ b/bio.c @@ -8,7 +8,13 @@ #include "buf.h" struct buf buf[NBUF]; -struct spinlock buf_table_lock = { "buf_table" }; +struct spinlock buf_table_lock; + +void +binit(void) +{ + initlock(&buf_table_lock, "buf_table"); +} struct buf * getblk() -- cgit v1.2.3