summaryrefslogtreecommitdiffstats
path: root/sys/netsmb/smb_iod.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-02-25 21:09:16 +0000
committerattilio <attilio@FreeBSD.org>2008-02-25 21:09:16 +0000
commit7ca346a265423cfa74eee348370cdb53da62bbca (patch)
tree1d005c04f5777d6857b4526a9d1350c7faf97443 /sys/netsmb/smb_iod.c
parent2cf50b2daaaa5cd106ea6aa20895b4223f99fdae (diff)
downloadFreeBSD-src-7ca346a265423cfa74eee348370cdb53da62bbca.zip
FreeBSD-src-7ca346a265423cfa74eee348370cdb53da62bbca.tar.gz
Remove a spourious Giant acquisition.
The code seems pretty MPSAFE and Giant is held over kproc_exit() which at lowel calls exit1(). exit1() requires Giant to be unowned so this opens a window for races. Reported by: Bryan Venteicher <bryanv at daemoninthecloset dot org> Tested by: Bryan Venteicher <bryanv at daemoninthecloset dot org>
Diffstat (limited to 'sys/netsmb/smb_iod.c')
-rw-r--r--sys/netsmb/smb_iod.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index 30ab73e..e265f43 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -652,7 +652,6 @@ smb_iod_thread(void *arg)
{
struct smbiod *iod = arg;
- mtx_lock(&Giant);
/*
* Here we assume that the thread structure will be the same
* for an entire kthread (kproc, to be more precise) life.
@@ -662,12 +661,10 @@ smb_iod_thread(void *arg)
while ((iod->iod_flags & SMBIOD_SHUTDOWN) == 0) {
smb_iod_main(iod);
SMBIODEBUG("going to sleep for %d ticks\n", iod->iod_sleeptimo);
-/* mtx_unlock(&Giant, MTX_DEF);*/
if (iod->iod_flags & SMBIOD_SHUTDOWN)
break;
tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo);
}
-/* mtx_lock(&Giant, MTX_DEF);*/
kproc_exit(0);
}
OpenPOWER on IntegriCloud