cvs commit: src/sys/kern vfs_cluster.c

Matthew Dillon dillon at
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 
  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

More information about the Commits mailing list