device_lookup() increments the reference count for the device, and we never decrement it. Since kernel mappings aren't touched if the device is closed, just grab the softc manually instead on these functions, this means close will be called after the kernel api has been used.
device_lookup() increments the reference count for the device, and we
never decrement it. Since kernel mappings aren't touched if the device
is closed, just grab the softc manually instead on these functions, this
means close will be called after the kernel api has been used.

ok kettenis@.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars