If you open /dev/ram7 when the kernel is configured for 4 ramdisks, things blow up. Teach rd_open() to check that the minor is in range. drivers/block/rd.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/block/rd.c~rd-range-check drivers/block/rd.c --- 25/drivers/block/rd.c~rd-range-check 2003-06-17 09:36:38.000000000 -0700 +++ 25-akpm/drivers/block/rd.c 2003-06-17 09:38:02.000000000 -0700 @@ -269,7 +269,10 @@ static struct backing_dev_info rd_backin static int rd_open(struct inode * inode, struct file * filp) { - int unit = minor(inode->i_rdev); + unsigned unit = minor(inode->i_rdev); + + if (unit >= NUM_RAMDISKS) + return -ENODEV; /* * Immunize device against invalidate_buffers() and prune_icache(). _