...introduced by commit 3b661a9 "[SCSI] fix hot unplug vs async scan race".
Don't restart lookup of more stargets in the multi-target case, just
arrange to traverse the list once, on the assumption that new targets
are always added at the end. There is no guarantee that the target will
change state in scsi_target_reap() so we can end up spinning if we
restart.
FYI, turns out, this is fixed in upstream 3.7 :
commit bc3f02a795d3b4f aa99d37390174be 2a75d091bd
Author: Dan Williams <email address hidden>
Date: Tue Aug 28 22:12:10 2012 -0700
[SCSI] scsi_remove_target: fix softlockup regression on hot remove
John reports: <ffffffff814178 2a>] scsi_remove_ target+ 0xda/0x1f0 <ffffffff81421d e5>] sas_rphy_ remove+ 0x55/0x60 <ffffffff81421e 01>] sas_rphy_ delete+ 0x11/0x20 <ffffffff81421e 35>] sas_port_ delete+ 0x25/0x160 <ffffffff814549 a3>] mptsas_ del_end_ device+ 0x183/0x270
BUG: soft lockup - CPU#2 stuck for 23s! [kworker/u:8:2202]
[..]
Call Trace:
[
[
[
[
[
...introduced by commit 3b661a9 "[SCSI] fix hot unplug vs async scan race".
Don't restart lookup of more stargets in the multi-target case, just
arrange to traverse the list once, on the assumption that new targets
are always added at the end. There is no guarantee that the target will
change state in scsi_target_reap() so we can end up spinning if we
restart.