VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Andrew Morton <akpm@osdl.org> 2007-02-12 00:51:43 -0800 committer: Linus Torvalds <torvalds@woody.linux-foundation.org> 2007-02-12 09:48:27 -0800 commit: 215122e1110f97a3f478829049b9840cf8fdde57 parent: 6ab8eb1cffcc5640ca5b07c2a0ddfaa8fbbcc754
Commit Summary:
[PATCH] register_chrdev_region() don't hand out the LOCAL/EXPERIMENTAL majors
Diffstat:
1 file changed, 7 insertions, 0 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index a885f46ca001..e6194e2b9bb9 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -108,6 +108,13 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
 	/* temporary */
 	if (major == 0) {
 		for (i = ARRAY_SIZE(chrdevs)-1; i > 0; i--) {
+			/*
+			 * Disallow the LANANA-assigned LOCAL/EXPERIMENTAL
+			 * majors
+			 */
+			if ((60 <= i && i <= 63) || (120 <= i && i <= 127) ||
+					(240 <= i && i <= 254))
+				continue;
 			if (chrdevs[i] == NULL)
 				break;
 		}