Both the devctl functionality initialization and GEOM class registration
is done during SI_SUB_DRIVERS in order SI_ORDER_SECOND. This makes them
dependent on link order as to which one gets run first. However, GEOM
class registration can cause devctl_notify() to be called. If devctl
functionality initialization has not yet been done, there will be an
attempt to lock the mutex in the devsoftc, which will be NULL. This
triggers the KASSERT() in __mtx_lock_flags.
In order to ensure devctl is initialized first, move GEOM class registration
to SI_ORDER_THIRD.
Obtained from: Juniper Networks, Inc.