Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=215122e1110f97a3f478829049b9840cf8fdde57 Commit: 215122e1110f97a3f478829049b9840cf8fdde57 Parent: 6ab8eb1cffcc5640ca5b07c2a0ddfaa8fbbcc754 Author: Andrew Morton <[EMAIL PROTECTED]> AuthorDate: Mon Feb 12 00:51:43 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Feb 12 09:48:27 2007 -0800
[PATCH] register_chrdev_region() don't hand out the LOCAL/EXPERIMENTAL majors As pointed out in http://bugzilla.kernel.org/show_bug.cgi?id=7922, dynamic chardev major allocation can hand out majors which LANANA has defined as being for local/experimental use. Cc: Torben Mathiasen <[EMAIL PROTECTED]> Cc: Greg KH <[EMAIL PROTECTED]> Cc: Al Viro <[EMAIL PROTECTED]> Cc: Tomas Klas <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/char_dev.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/char_dev.c b/fs/char_dev.c index a885f46..e6194e2 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; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html