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

git: CAM - Fix missing SIM lock in cam_periph_release()


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Sep 2009 15:31:36 -0700 (PDT)

commit f627566b0930dac0199460857380c4ec422a05bf
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Wed Sep 30 15:26:05 2009 -0700

    CAM - Fix missing SIM lock in cam_periph_release()
    
    * When releasing the last reference on a CAM peripheral which has been
      marked invalid, the peripheral is then freed.  Freeing the peripheral
      requires the SIM lock.
    
      Go through necessary tribulations to acquire the SIM lock.  The lock order
      is important (SIM lock first, XPT lock second), and the SIM lock may or
      may not already be held by the thread.
    
    * The bug could cause a crash after burning a CD as the CD becomes invalid
      after the burn completes in order to reload its state.

Summary of changes:
 sys/bus/cam/cam_periph.c |   52 ++++++++++++++++++++++++++++++++++++++--------
 sys/bus/cam/cam_sim.c    |   24 +++++++++++++++++++++
 sys/bus/cam/cam_sim.h    |    8 +++++-
 3 files changed, 73 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f627566b0930dac0199460857380c4ec422a05bf


-- 
DragonFly BSD source repository



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