Skip to content
  • Hua Zhong's avatar
    [PATCH] IDE error handling fixes · ce42f191
    Hua Zhong authored
    
    
    In 2.6.15.1 I encountered some IDE crashes when unplugging IDE cables to
    emulate disk errors.  Below is a patch against 2.6.16 which I think still
    applies.
    
    1.  The first BUG_ON could trigger when a PREFLUSH IO fails (it would
       fail the original barrier request which hasn't been marked REQ_STARTED
       yet).
    
    2. the rq could have been dequeued already (same as 1).
    
    3.  HWGROUP(drive)->rq could be NULL because of the ide_error() several
       lines earlier.
    
    Signed-off-by: default avatarHua Zhong <hzhong@gmail.com>
    Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ce42f191