cvs commit: src/sys/kern vfs_cluster.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Mar 10 09:54:00 PST 2006
dillon 2006/03/10 09:51:54 PST
DragonFly src repository
Modified files:
sys/kern vfs_cluster.c
Log:
cluster_read() was very dangerously issuing a blind BMAP for a buffer
cache block that was not yet locked, then locking the block and
unconditionally setting its block number translation to the results.
Due to the potential blocking that can occur inbetween these two operations,
it is possible (but not proven) that this can result in a buffer with a
stale translation. If that buffer is later dirtied and written to disk,
the filesystem can become corrupt.
Change the code to getblk() the block prior to attempting to BMAP it, and
make the fbp argument to cluster_rbuild() mandatory.
Revision Changes Path
1.18 +29 -27 src/sys/kern/vfs_cluster.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_cluster.c.diff?r1=1.17&r2=1.18&f=u
More information about the Commits
mailing list