Open DemiMarie opened 2 years ago
Doesn't this pose a denial of service risk once the device number range is exhausted?
The full range (major + minor) is 64 bits, so I don’t think we need to worry about it running out. That said, an even nicer approach would be to use something other than major and minor numbers to identify a device. Perhaps have a /dev/disk/by-diskseq
filesystem maintained in the kernel, and something similar for character devices?
To avoid race conditions in userspace, major/minor device combinations for hot-pluggable devices should never be reused.