One more approach to fs/partitions/ibm.c
Subsystems (2)
Al,
the failure of our experiment with check_partitions that did do_open keeps nagging me like a bad tooth. Here's another way to word around that problem. Observe that we do have one backdoor already, so I am not making it any worse than it was. What do you think?
-- Pete
drivers/s390/block/dasd.c +4 -1
@@ -4187,6 +4187,7 @@ goto failed; } genhd_dasd_name = dasd_device_name; + genhd_dasd_ioctl = dasd_ioctl;if (dasd_autodetect) {/* update device range to all devices */ for (irq = get_irq_first (); irq != -ENODEV;
@@ -4309,7 +4310,9 @@ printk (KERN_INFO PRINTK_HEADER "De-Registered ECKD discipline successfully\n");#endif /* CONFIG_DASD_ECKD_BUILTIN */ - + + genhd_dasd_name =NULL ; + genhd_dasd_ioctl =NULL ;dasd_proc_cleanup (); list_for_each_safe (l, n, &dasd_major_info[0].list) {
drivers/s390/block/dasd_int.h +2 -0
@@ -367,6 +367,8 @@extern debug_info_t *dasd_debug_area;extern int (*genhd_dasd_name) (char *,int ,int ,struct gendisk *); +extern int (*genhd_dasd_ioctl) (struct inode *inp,struct file *filp, +unsigned int no,unsigned long data);#endif /* __KERNEL__ */
fs/partitions/Makefile +1 -1
@@ -9,7 +9,7 @@ O_TARGET := partitions.o -export-objs := check.o ibm.o msdos.o +export-objs := check.o msdos.o obj-y := check.o
fs/partitions/check.c +5 -1
@@ -77,13 +77,17 @@/* * This is ucking fugly but its probably the best thing for 2.4.x -* Take it as a clear reminder than we should put the device name +* Take it as a clear reminder that: 1) we should put the device name * generation in the object kdev_t points to in 2.5. +* and 2) ioctls better work on half-opened devices. */ #ifdef CONFIG_ARCH_S390 int (*genhd_dasd_name)(char *,int ,int ,struct gendisk *) =NULL ; +int (*genhd_dasd_ioctl)(struct inode *inp,struct file *filp, +unsigned int no,unsigned long data);EXPORT_SYMBOL (genhd_dasd_name); +EXPORT_SYMBOL (genhd_dasd_ioctl);#endif /*
fs/partitions/ibm.c +160 -132
332 lines not on this page · raw message