linux-stable/drivers/scsi/bnx2fc
Chad Dupuis faae19be80 scsi: bnx2fc: Fix hung task messages when a cleanup response is not received during abort
If a cleanup task is not responded to while we are in bnx2fc_abts_cleanup, it
will hang the SCSI error handler since we use wait_for_completion instead of
wait_for_completion_timeout.  So, use wait_for_completion_timeout so that we
don't hang the SCSI error handler thread forever.

Fixes the call trace:

[183373.131468] INFO: task scsi_eh_16:110146 blocked for more than 120 seconds.
[183373.131469] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[183373.131470] scsi_eh_16      D ffff88103f2fca14     0 110146      2 0x00000080
[183373.131472]  ffff880855e77cb0 0000000000000046 ffff881050654e70 ffff880855e77fd8
[183373.131474]  ffff880855e77fd8 ffff880855e77fd8 ffff881050654e70 ffff88103f2fcb48
[183373.131475]  ffff88103f2fcb50 7fffffffffffffff ffff881050654e70 ffff88103f2fca14
[183373.131477] Call Trace:
[183373.131479]  [<ffffffff8168b579>] schedule+0x29/0x70
[183373.131481]  [<ffffffff81688fc9>] schedule_timeout+0x239/0x2d0
[183373.131486]  [<ffffffff8142821e>] ? __dev_printk+0x3e/0x90
[183373.131487]  [<ffffffff814282cd>] ? dev_printk+0x5d/0x80
[183373.131490]  [<ffffffff8168b956>] wait_for_completion+0x116/0x170
[183373.131492]  [<ffffffff810c4ec0>] ? wake_up_state+0x20/0x20
[183373.131494]  [<ffffffffa048c234>] bnx2fc_abts_cleanup+0x3d/0x62 [bnx2fc]
[183373.131497]  [<ffffffffa0483a80>] bnx2fc_eh_abort+0x470/0x580 [bnx2fc]
[183373.131500]  [<ffffffff814570af>] scsi_error_handler+0x59f/0x8b0
[183373.131501]  [<ffffffff81456b10>] ? scsi_eh_get_sense+0x250/0x250
[183373.131503]  [<ffffffff810b052f>] kthread+0xcf/0xe0
[183373.131505]  [<ffffffff810b0460>] ? kthread_create_on_node+0x140/0x140
[183373.131507]  [<ffffffff81696418>] ret_from_fork+0x58/0x90
[183373.131509]  [<ffffffff810b0460>] ? kthread_create_on_node+0x140/0x140

Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-11-15 18:44:56 -05:00
..
57xx_hsi_bnx2fc.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc.h scsi: bnx2fc: remove obsolete bnx2fc_eh_host_reset() definition 2017-08-25 17:21:12 -04:00
bnx2fc_constants.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_els.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_fcoe.c scsi: fcoe: Convert timers to use timer_setup() 2017-10-27 02:22:00 -07:00
bnx2fc_hwi.c scsi: bnx2fc: Plug CPU hotplug race 2017-07-26 21:51:24 -04:00
bnx2fc_io.c scsi: bnx2fc: Fix hung task messages when a cleanup response is not received during abort 2017-11-15 18:44:56 -05:00
bnx2fc_tgt.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
Kconfig bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
Makefile [SCSI] bnx2fc: Reduce object size by consolidating formats 2012-07-20 08:58:17 +01:00