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() --- fs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'fs.c') diff --git a/fs.c b/fs.c index 126c18f..b298d7f 100644 --- a/fs.c +++ b/fs.c @@ -13,10 +13,16 @@ // these are inodes currently in use // an entry is free if count == 0 struct inode inode[NINODE]; -struct spinlock inode_table_lock = { "inode_table" }; +struct spinlock inode_table_lock; uint rootdev = 1; +void +iinit(void) +{ + initlock(&inode_table_lock, "inode_table"); +} + static uint balloc(uint dev) { -- cgit v1.2.3