alloc_chrdev_region doubt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

In fs/char_dev.c the function  alloc_chrdev_region() allows the user
to allocate device number even when the count is 0.Something like this

retval=alloc_chrdev_region(&dev,0,0,"mychrdev");

This leads to a situation where callling unregister_chrdev_region()
would not be able to free up the device number.

Shouldn't there be a check which prevents this kind of allocation in
the first place?




-- 
Anubhav Rakshit

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux