aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-10-31 16:40:37 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2007-11-07 11:15:49 -0500
commite85fbc595aa527e0b3c9a738c4dc1d7717afb30c (patch)
tree6d953c87b9b1d99af671d99baad9a20d90008766 /drivers
parent3b2d871245357015cac621d7612b6ecf59f424df (diff)
[SCSI] aacraid: fix potential panic in thread stop
Got a panic in the threading code on an older kernel when the Adapter failed to load properly and driver shut down apparently before any threading had started, can not dupe. Expect that this may be relevant in the latest kernel, but not sure. This patch does no harm, and should alleviate the possibility of this panic. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/aacraid/linit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 038980be763d..53061bceaad8 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -950,7 +950,8 @@ static struct scsi_host_template aac_driver_template = {
950 950
951static void __aac_shutdown(struct aac_dev * aac) 951static void __aac_shutdown(struct aac_dev * aac)
952{ 952{
953 kthread_stop(aac->thread); 953 if (aac->aif_thread)
954 kthread_stop(aac->thread);
954 aac_send_shutdown(aac); 955 aac_send_shutdown(aac);
955 aac_adapter_disable_int(aac); 956 aac_adapter_disable_int(aac);
956 free_irq(aac->pdev->irq, aac); 957 free_irq(aac->pdev->irq, aac);