diff options
Diffstat (limited to 'ide.c')
-rw-r--r-- | ide.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -48,7 +48,7 @@ void ideinit(void) { int i; - + initlock(&idelock, "ide"); picenable(IRQ_IDE); ioapicenable(IRQ_IDE, ncpu - 1); @@ -73,6 +73,8 @@ idestart(struct buf *b) { if(b == 0) panic("idestart"); + if(b->blockno >= FSSIZE) + panic("incorrect blockno"); int sector_per_block = BSIZE/SECTOR_SIZE; int sector = b->blockno * sector_per_block; |