Date: Wed, 14 Oct 2015 12:35:41 +0200 From: Manuel Bouyer <[email protected]>
A way to fix this would be to use mutex_tryenter() in sme_events_check(), and just reschedule the callout if it can't get the lock. Does anyone see a problem with this approach ? That may be a temporary stop-gap, but it is wrong to sleep in gttwsi_wait while holding sme->sme_mtx, or any other mutex (e.g., sme_global_mtx). This is not gttwsi_wait's fault -- this is envsys's fault. The correct solution should be to change the API to avoid holding a mutex across calls to a device sensor refresh routine. Something like kern/kern_rndsink.c, perhaps.
