cciss: fix warning oops on rmmod of driver
authorscameron@beardog.cca.cpqcorp.net <scameron@beardog.cca.cpqcorp.net>
Thu, 17 Apr 2008 11:19:04 +0000 (13:19 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 21 Apr 2008 07:50:09 +0000 (09:50 +0200)
* Fix oops on cciss rmmod due to calling pci_free_consistent with
  irqs disabled.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/cciss_scsi.c

index 45ac093..e4bf9a1 100644 (file)
@@ -1349,9 +1349,9 @@ cciss_unregister_scsi(int ctlr)
        /* set scsi_host to NULL so our detect routine will 
           find us on register */
        sa->scsi_host = NULL;
+       spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
        scsi_cmd_stack_free(ctlr);
        kfree(sa);
-       spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
 }
 
 static int