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 45ac09300eb338c50f372bd51f2532e8bdec8d1b..e4bf9a11ca0d0b1c0cc6a619b4d1fa59bedd5508 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