Patch for kernel.real-root-dev on s390

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Wed Nov 07 2001 - 17:11:10 EST


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

diff -ur -X dontdiff linux-2.4.9-13.1/drivers/block/rd.c linux-2.4.9-13.1pt1/drivers/block/rd.c
--- linux-2.4.9-13.1/drivers/block/rd.c Tue Nov 6 19:19:21 2001
+++ linux-2.4.9-13.1pt1/drivers/block/rd.c Tue Nov 6 23:43:49 2001
@@ -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;
diff -ur -X dontdiff linux-2.4.9-13.1/include/linux/fs.h linux-2.4.9-13.1pt1/include/linux/fs.h
--- linux-2.4.9-13.1/include/linux/fs.h Tue Nov 6 19:19:10 2001
+++ linux-2.4.9-13.1pt1/include/linux/fs.h Tue Nov 6 23:46:44 2001
@@ -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
 
diff -ur -X dontdiff linux-2.4.9-13.1/init/main.c linux-2.4.9-13.1pt1/init/main.c
--- linux-2.4.9-13.1/init/main.c Tue Nov 6 19:19:19 2001
+++ linux-2.4.9-13.1pt1/init/main.c Tue Nov 6 23:46:12 2001
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:36 EST