aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2008-02-25 21:09:16 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-02-25 21:09:16 +0000
commit100a4abc465a22899aa875779dad8e023af9a453 (patch)
tree1d005c04f5777d6857b4526a9d1350c7faf97443 /sys/netsmb
parent303d3f35fb1b61f7edf76692397f79a646a8aa16 (diff)
downloadsrc-100a4abc465a22899aa875779dad8e023af9a453.tar.gz
src-100a4abc465a22899aa875779dad8e023af9a453.zip
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>
Notes
Notes: svn path=/head/; revision=176566
Diffstat (limited to 'sys/netsmb')
-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 30ab73eb4fa4..e265f4332a0c 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);
}