]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/aacraid/linit.c
[SCSI] aacraid: fix potential panic in thread stop
[karo-tx-linux.git] / drivers / scsi / aacraid / linit.c
index a7f42a17b5c708ba331b59874690f8a84cdab920..53061bceaad850d9ad81de84d63743675715b7d4 100644 (file)
@@ -944,12 +944,14 @@ static struct scsi_host_template aac_driver_template = {
        .cmd_per_lun                    = AAC_NUM_IO_FIB, 
 #endif 
        .use_clustering                 = ENABLE_CLUSTERING,
+       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .emulated                       = 1,
 };
 
 static void __aac_shutdown(struct aac_dev * aac)
 {
-       kthread_stop(aac->thread);
+       if (aac->aif_thread)
+               kthread_stop(aac->thread);
        aac_send_shutdown(aac);
        aac_adapter_disable_int(aac);
        free_irq(aac->pdev->irq, aac);