linux/drivers/scsi/aacraid
Raghava Aditya Renukunta 139b79136f aacraid: Fix for aac_command_thread hang
commit fc4bf75ea3 upstream.

Typically under error conditions, it is possible for aac_command_thread()
to miss the wakeup from kthread_stop() and go back to sleep, causing it
to hang aac_shutdown.

In the observed scenario, the adapter is not functioning correctly and so
aac_fib_send() never completes (or time-outs depending on how it was
called). Shortly after aac_command_thread() starts it performs
aac_fib_send(SendHostTime) which hangs. When aac_probe_one
/aac_get_adapter_info send time outs, kthread_stop is called which breaks
the command thread out of it's hang.

The code will still go back to sleep in schedule_timeout() without
checking kthread_should_stop() so it causes aac_probe_one to hang until
the schedule_timeout() which is 30 minutes.

Fixed by: Adding another kthread_should_stop() before schedule_timeout()
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-08-22 22:37:52 +01:00
..
aachba.c [SCSI] aacraid: SCSI dma mapping failure case handling 2012-11-27 08:59:46 +04:00
aacraid.h [SCSI] aacraid: kdump fix 2014-03-15 10:19:00 -07:00
commctrl.c aacraid: prevent invalid pointer dereference 2013-11-19 16:27:39 -08:00
comminit.c [SCSI] aacraid: Dual firmware image support 2013-04-10 11:55:52 -07:00
commsup.c aacraid: Fix for aac_command_thread hang 2016-08-22 22:37:52 +01:00
dpcsup.c [SCSI] aacraid: Series 7 Async. (performance) mode support 2012-07-20 08:59:04 +01:00
linit.c [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers 2013-11-29 08:48:39 +04:00
Makefile [SCSI] aacraid: Add new code for PMC-Sierra's SRC based controller family 2011-03-23 11:36:58 -05:00
nark.c [SCSI] aacraid: Use resource_size_t for IO mem pointers and offsets 2012-07-20 08:58:43 +01:00
rkt.c [SCSI] aacraid: Use resource_size_t for IO mem pointers and offsets 2012-07-20 08:58:43 +01:00
rx.c [SCSI] remove deprecated IRQF_DISABLED from SCSI 2014-03-19 15:04:44 -07:00
sa.c [SCSI] remove deprecated IRQF_DISABLED from SCSI 2014-03-19 15:04:44 -07:00
src.c [SCSI] remove deprecated IRQF_DISABLED from SCSI 2014-03-19 15:04:44 -07:00
TODO [SCSI] aacraid: Newer adapter communication iterface support 2005-10-28 11:41:53 -05:00