It is possible for a sensor to be detached and freed while it is being copied out to userland. If this happens we get a use after free and things blow up. Prevent this by making a local copy of the sensor that cannot be freed elsewhere in the kernel and copying that out instead.
It is possible for a sensor to be detached and freed while it is being
copied out to userland. If this happens we get a use after free and things
blow up. Prevent this by making a local copy of the sensor that cannot be
freed elsewhere in the kernel and copying that out instead.

found by mbalmer@
ok deraadt@ krw@

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