Re: [PATCH] register_blkdev

From: Greg KH (greg@kroah.com)
Date: Fri Mar 07 2003 - 19:53:33 EST


On Sat, Mar 08, 2003 at 01:57:00AM +0100, Andries.Brouwer@cwi.nl wrote:
> So my first job is to make sure that no bad minor is ever used
> as array index. Fortunately registration is not by major but
> by dev_t interval, so things tend to be correct automatically.

But register_chrdev() only allocates based on a major. If a character
driver asks for a major, today it only thinks it has 256 minors, so that
number is usually hard coded in an array. If a open() happens on a
minor outside that range, the driver will die a horrible death, right?

thanks,

greg k-h
-
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 : Fri Mar 07 2003 - 22:00:40 EST