Skip to contentSkip to conversation

Patch for kernel.real-root-dev on s390

PATCH Pete Zaitcev 1 participant 1 message Nov 7, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

what do you think about the attached patch. Without it, a sysctl to kernel.real-root-dev corrupts adjacent memory. Anyone cares to comment?

-- Pete

drivers/block/rd.c +0 -3
diff -ur -X dontdiff linux-2.4.9-13.1/drivers/block/rd.c linux-2.4.9-13.1pt1/drivers/block/rd.c
@@ -704,9 +704,6 @@
 
 static void __init rd_load_disk(int n)
 {
-#ifdef CONFIG_BLK_DEV_INITRD
-	extern kdev_t real_root_dev;
-#endif
 
 	if (rd_doload == 0)
 		return;
include/linux/fs.h +1 -1
diff -ur -X dontdiff linux-2.4.9-13.1/include/linux/fs.h linux-2.4.9-13.1pt1/include/linux/fs.h
@@ -1471,7 +1471,7 @@
 extern void mount_root(void);
 
 #ifdef CONFIG_BLK_DEV_INITRD
-extern kdev_t real_root_dev;
+extern unsigned int real_root_dev;
 extern int change_root(kdev_t, const char *);
 #endif
 
init/main.c +1 -1
diff -ur -X dontdiff linux-2.4.9-13.1/init/main.c linux-2.4.9-13.1pt1/init/main.c
@@ -126,7 +126,7 @@
 int rows, cols;
 
 #ifdef CONFIG_BLK_DEV_INITRD
-kdev_t real_root_dev;
+unsigned int real_root_dev;	/* do_proc_dointvec cannot handle kdev_t */
 #endif
 
 int root_mountflags = MS_RDONLY;