mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 08:12:27 -04:00
Currently it is possible to assign a unit number that already exists. Suppose the following channel list: [vp2] If we create 3 channels, we'll end up with the following list: [vp0, vp1, vp2, vp2] This happens because chn_init() does not check if the unit number we are assigning already exists. While fixing this is trivial when the channel list is sorted in ascending order, it is way more involved when sorted in descending order. Even though sorting the list in descending order would require deliberately modifying pcm_chn_add(), and is most likely not going to happen, make the mechanism more robust by using a unr(9) allocator for each channel type. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46680 |
||
|---|---|---|
| .. | ||
| fdt | ||
| isa | ||
| macio | ||
| midi | ||
| pci | ||
| pcm | ||
| usb | ||
| driver.c | ||
| dummy.c | ||