summaryrefslogtreecommitdiffstats
path: root/sys/netsmb
diff options
context:
space:
mode:
authoravatar <avatar@FreeBSD.org>2007-02-09 02:54:13 +0000
committeravatar <avatar@FreeBSD.org>2007-02-09 02:54:13 +0000
commit7f38d2a60b81a100e8a6e0fb624142598b324129 (patch)
treefbe7a9d5302705d4dc61d00977964c5dd5d46c68 /sys/netsmb
parent17421a0b95c12ae1405cb50fef7a6e346c7a00b5 (diff)
downloadFreeBSD-src-7f38d2a60b81a100e8a6e0fb624142598b324129.zip
FreeBSD-src-7f38d2a60b81a100e8a6e0fb624142598b324129.tar.gz
It turns out that devfs_close() does a dev_refthread() before invoking
device specific d_close(), which makes subsequent destroy_dev() being blocked in the "devdrn" loop. This bandaid should fix the smbfs hang/crashing observed on -CURRENT since the introduction of sys/kern/kern_conf.c:1.199: # mount_smbfs -I server //server/share /mnt Password: [hang] Reviewed by: bp See also: http://lists.freebsd.org/pipermail/cvs-src/2006-November/071379.html
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_dev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c
index d3ed95a..deef426 100644
--- a/sys/netsmb/smb_dev.c
+++ b/sys/netsmb/smb_dev.c
@@ -175,6 +175,7 @@ nsmb_dev_close(struct cdev *dev, int flag, int fmt, struct thread *td)
*/
dev->si_drv1 = NULL;
free(sdp, M_NSMBDEV);
+ dev_relthread(dev); /* XXX dealing with si_threadcount */
destroy_dev(dev);
splx(s);
return 0;
OpenPOWER on IntegriCloud