summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-03-27 01:23:59 +0000
committerattilio <attilio@FreeBSD.org>2008-03-27 01:23:59 +0000
commitb94ea1b2e30ca24ef9a22f57fffeb4aeae424f9f (patch)
treec044f61afdd20469ad9c6f9799fd2f5833f1f254 /sys
parent0a735e0d07509a7266789a132da6ee024ec2f29e (diff)
downloadFreeBSD-src-b94ea1b2e30ca24ef9a22f57fffeb4aeae424f9f.zip
FreeBSD-src-b94ea1b2e30ca24ef9a22f57fffeb4aeae424f9f.tar.gz
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
Diffstat (limited to 'sys')
-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 860ff4b..29b48e7 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);
}
OpenPOWER on IntegriCloud