Add a Edit the new interface to support Cisco's An圜onnect 5090, macOS and OS Powerful Connections. If instances remain, kextunload fails (the terminated instances stay terminated.
It will then wait a bit and check if any of that kext's classes still have instances.
The usage of file descriptors could mitigate this issue, but in reality, there is a race condition between when the kext is being verified and when it’s being loaded into the kernel. In theory, this could be fine, if kextutil would open the kext just once, loading all the files, performing the checks and then load the files from memory.