summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/ndis/kern_ndis.c1
-rw-r--r--sys/dev/aac/aac.c1
-rw-r--r--sys/dev/md/md.c4
-rw-r--r--sys/dev/pccbb/pccbb.c1
-rw-r--r--sys/dev/random/harvest.c1
-rw-r--r--sys/dev/utopia/utopia.c1
-rw-r--r--sys/geom/bde/g_bde_work.c1
-rw-r--r--sys/kern/kern_intr.c1
-rw-r--r--sys/nfs4client/nfs4_vfsops.c1
-rw-r--r--sys/opencrypto/crypto.c1
10 files changed, 3 insertions, 10 deletions
diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c
index 7d1fb98..68c7ef3 100644
--- a/sys/compat/ndis/kern_ndis.c
+++ b/sys/compat/ndis/kern_ndis.c
@@ -244,7 +244,6 @@ ndis_runq(arg)
}
wakeup(die);
- mtx_lock(&Giant);
kthread_exit(0);
}
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 89354fd..22b3de1 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -814,7 +814,6 @@ aac_command_thread(struct aac_softc *sc)
AAC_LOCK_RELEASE(&sc->aac_io_lock);
wakeup(sc->aac_dev);
- mtx_lock(&Giant);
kthread_exit(0);
}
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 4564aa69..0d3d918 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -638,8 +638,8 @@ md_kthread(void *arg)
mtx_unlock(&sc->queue_mtx);
sc->procp = NULL;
wakeup(&sc->procp);
- if (!hasgiant)
- mtx_lock(&Giant);
+ if (hasgiant)
+ mtx_unlock(&Giant);
kthread_exit(0);
}
msleep(sc, &sc->queue_mtx, PRIBIO | PDROP, "mdwait", 0);
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 5e7bdf6..ad3810f 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -1053,7 +1053,6 @@ cbb_event_thread(void *arg)
mtx_unlock(&sc->mtx);
}
sc->flags &= ~CBB_KTHREAD_RUNNING;
- mtx_lock(&Giant); /* kthread_exit drops */
kthread_exit(0);
}
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index fd94bd2..eb84268 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -128,7 +128,6 @@ void
random_set_wakeup_exit(void *control)
{
wakeup(control);
- mtx_lock(&Giant);
kthread_exit(0);
/* NOTREACHED */
}
diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c
index 2d84c71..447b980 100644
--- a/sys/dev/utopia/utopia.c
+++ b/sys/dev/utopia/utopia.c
@@ -1512,7 +1512,6 @@ utopia_daemon(void *arg __unused)
}
wakeup_one(&utopia_list);
UTP_RUNLOCK_LIST();
- mtx_lock(&Giant);
kthread_exit(0);
}
diff --git a/sys/geom/bde/g_bde_work.c b/sys/geom/bde/g_bde_work.c
index f486558..f2baef5 100644
--- a/sys/geom/bde/g_bde_work.c
+++ b/sys/geom/bde/g_bde_work.c
@@ -663,7 +663,6 @@ g_bde_worker(void *arg)
mtx_unlock(&sc->worklist_mutex);
sc->dead = 2;
wakeup(sc);
- mtx_lock(&Giant);
kthread_exit(0);
}
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 515c1b9..fcf6f66 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -508,7 +508,6 @@ ithread_loop(void *arg)
p->p_pid, p->p_comm);
td->td_ithd = NULL;
mtx_destroy(&ithd->it_lock);
- mtx_lock(&Giant);
free(ithd, M_ITHREAD);
kthread_exit(0);
}
diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c
index ba03cc8..6a59df5 100644
--- a/sys/nfs4client/nfs4_vfsops.c
+++ b/sys/nfs4client/nfs4_vfsops.c
@@ -509,6 +509,7 @@ nfs4_daemon(void *arg)
if (nmounts == 0) {
mtx_lock(&Giant);
nfs4_daemonproc = NULL;
+ mtx_unlock(&Giant);
printf("nfsv4 renewd exiting\n");
kthread_exit(0);
}
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
index 3bb53bc..b9bacb5 100644
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -1055,7 +1055,6 @@ crypto_finis(void *chan)
CRYPTO_DRIVER_LOCK();
wakeup_one(chan);
CRYPTO_DRIVER_UNLOCK();
- mtx_lock(&Giant);
kthread_exit(0);
}
OpenPOWER on IntegriCloud