Re: [PATCH] register_blkdev

Greg KH
2003-03-08T00:55:03Z

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