We have a kernel extension. The userspace to kernel communication happens using IOKit. Kernel extension is loaded successfully, checked using kextstat and ioreg. But still IOServiceMatching fails and returns NULL. This is occurring on specific setups, intermittently.
Steps to Reproduce:
- Write a custom kernel extension
- Load kernel extension
- In userspace code, call IOKit API named "IOServiceMatching", to get the service handle for same kernel extension.
Expected Results: IOServiceMatching should not return NULL as extension is loaded successfully.
Actual Results: IOServiceMatching is retuning NULL.
Version/Build: SDK Osx 10.11.
Configuration: Issue is reproducible on both Sierra and HighSierra.