DragonFly BSD
DragonFly commits List (threaded) for 2006-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/kern vfs_cluster.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Mar 2006 09:51:55 -0800 (PST)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]