Messages in this thread | | | Date | Fri, 7 Mar 2003 16:53:33 -0800 | From | Greg KH <> | Subject | Re: [PATCH] register_blkdev |
| |
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/
| |