diff options
-rw-r--r-- | sys/netgraph/ng_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index 63bc755..2853b99 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -433,8 +433,8 @@ ngdread(struct cdev *dev, struct uio *uio, int flag) return (EWOULDBLOCK); mtx_lock(&priv->ngd_mtx); priv->flags |= NGDF_RWAIT; - mtx_unlock(&priv->ngd_mtx); - if ((error = tsleep(priv, PCATCH | (PZERO + 1), + if ((error = msleep(priv, &priv->ngd_mtx, + PDROP | PCATCH | (PZERO + 1), "ngdread", 0)) != 0) return (error); } |