DragonFly commits List (threaded) for 2005-01
cvs commit: src/sys/vfs/smbfs smbfs_io.c
dillon 2005/01/08 10:57:48 PST
DragonFly src repository
Fix one of probably several smbfs issues. smbfs is improperly tracking
open() and close() calls and closing the remote FID on the last close().
This appears to be done due to the limited number of FIDs available.
The problem is that the vnode might still be referenced and used by mapped
memory (mmap), so smbfs_getpages and putpages will seg-fault the user
program if there is no open descriptor on the file.
For now temporarily reopen and reclose the file. This is inefficient, but
it should work. The whole tracking section of smbfs really needs a rewrite.
There are guarenteed to be many other issues with smbfs.
Reported-by: Rumko <rumcic@xxxxxxxxx>
Revision Changes Path
1.15 +38 -2 src/sys/vfs/smbfs/smbfs_io.c