Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fdf892be32d84a1745fa0aee5fc60517421b8038 Commit: fdf892be32d84a1745fa0aee5fc60517421b8038 Parent: 215122e1110f97a3f478829049b9840cf8fdde57 Author: Andrew Morton <[EMAIL PROTECTED]> AuthorDate: Mon Feb 12 00:51:44 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Feb 12 09:48:27 2007 -0800
[PATCH] register_blkdev(): don't hand out the LOCAL/EXPERIMENTAL majors As pointed out in http://bugzilla.kernel.org/show_bug.cgi?id=7922, dynamic blockdev 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]> --- block/genhd.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 457fdac..36bd3e1 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -61,6 +61,14 @@ int register_blkdev(unsigned int major, const char *name) /* temporary */ if (major == 0) { for (index = ARRAY_SIZE(major_names)-1; index > 0; index--) { + /* + * Disallow the LANANA-assigned LOCAL/EXPERIMENTAL + * majors + */ + if ((60 <= index && index <= 63) || + (120 <= index && index <= 127) || + (240 <= index && index <= 254)) + continue; if (major_names[index] == 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