Messages in this thread Patch in this message | | | Date | Sat, 5 Dec 1998 18:30:04 +0100 (MET) | From | (Guest section DW) | Subject | Re: Oops in 2.1.131 accessing IDE CD-ROM |
| |
The real problem may be entirely different, but at least there is a flaw in the isofs code there, where the result of get_blkfops() is dereferenced without testing for NULL. So, a slightly healthier version may be
--- inode.c~ Sat Sep 26 01:27:13 1998 +++ inode.c Sat Dec 5 18:23:14 1998 @@ -409,11 +409,13 @@ struct cdrom_multisession ms_info; unsigned int vol_desc_start; struct inode inode_fake; + struct file_operations *fops; extern struct file_operations * get_blkfops(unsigned int); int i; vol_desc_start=0; - if (get_blkfops(MAJOR(dev))->ioctl!=NULL) + fops = get_blkfops(MAJOR(dev)); + if (fops && fops->ioctl) { /* Whoops. We must save the old FS, since otherwise * we would destroy the kernels idea about FS on root @@ -423,10 +425,8 @@ inode_fake.i_rdev=dev; ms_info.addr_format=CDROM_LBA; set_fs(KERNEL_DS); - i=get_blkfops(MAJOR(dev))->ioctl(&inode_fake, - NULL, - CDROMMULTISESSION, - (unsigned long) &ms_info); + i = fops->ioctl(&inode_fake, NULL, CDROMMULTISESSION, + (unsigned long) &ms_info); set_fs(old_fs); #if 0 printk("isofs.inode: CDROMMULTISESSION: rc=%d\n",i);
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |