From: Mark Haverkamp Date: Fri, 14 Oct 2005 22:59:10 +0000 (-0700) Subject: [PATCH] aacraid: host_lock not released fix X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0e7734d3ca24302a513e69dd24a560c34047c038;p=mv-sheeva.git [PATCH] aacraid: host_lock not released fix While doing some testing of error cases I ran into this bug. In some cases the reset handler can exit with the host_lock still held. Signed-off-by: Mark Haverkamp Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index de8490a9283..a1f9ceef0ac 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -453,9 +453,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) /* * We can exit If all the commands are complete */ + spin_unlock_irq(host->host_lock); if (active == 0) return SUCCESS; - spin_unlock_irq(host->host_lock); ssleep(1); spin_lock_irq(host->host_lock); }