aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2008-03-27 01:23:59 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-03-27 01:23:59 +0000
commite15e150d76dbd369d75d314eab3aac2de9ea0f1d (patch)
treec044f61afdd20469ad9c6f9799fd2f5833f1f254 /sys/netsmb
parent2c2f4a605d5ce7bb3bec57e1de85dd230b0be976 (diff)
downloadsrc-e15e150d76dbd369d75d314eab3aac2de9ea0f1d.tar.gz
src-e15e150d76dbd369d75d314eab3aac2de9ea0f1d.zip
Really, smb_iod_main() is not totally MPSAFE, so just acquire and drop
Giant around it in order to assume MPSAFETY. Reported by: jhb, rwatson Pointy hat to: attilio
Notes
Notes: svn path=/head/; revision=177654
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_iod.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index 860ff4b291af..29b48e737a85 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -652,6 +652,8 @@ 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.
@@ -665,6 +667,7 @@ smb_iod_thread(void *arg)
break;
tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo);
}
+ mtx_unlock(&Giant);
kproc_exit(0);
}