git: kernel - Fix boot-time panic in NATA revealed by new callout mechanics

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Nov 25 14:13:26 PST 2014


commit 15bd3c7353c5ce02776849ca16be00d5088d8734
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Nov 25 14:11:42 2014 -0800

    kernel - Fix boot-time panic in NATA revealed by new callout mechanics
    
    * The NATA driver was using spin locks in a very, very dangerous way.
      They did not play nice with the new blocking callout mechanism.
    
    * Replace all of NATAs spinlocks with lockmgr locks.  In addition, change
      all asynchronous callout_stop() calls to synchronous callout_stop_sync()
      calls, and use callout_init_lk() to auto-lock ch->state_lock for the
      callback, which fixes a long-time deadlock race.
    
    Reported-by: tuxillo

Summary of changes:
 sys/dev/disk/nata/ata-all.c      | 35 +++++++++--------
 sys/dev/disk/nata/ata-all.h      |  9 ++---
 sys/dev/disk/nata/ata-chipset.c  | 38 +++++++++----------
 sys/dev/disk/nata/ata-lowlevel.c |  2 +-
 sys/dev/disk/nata/ata-queue.c    | 81 ++++++++++++++++++++--------------------
 sys/dev/disk/nata/ata-raid.c     | 22 +++++------
 sys/dev/disk/nata/ata-raid.h     |  4 +-
 sys/dev/disk/nata/atapi-cam.c    | 44 +++++++++++-----------
 8 files changed, 114 insertions(+), 121 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/15bd3c7353c5ce02776849ca16be00d5088d8734


-- 
DragonFly BSD source repository



More information about the Commits mailing list