aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-08-21 15:05:02 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2022-09-01 01:02:10 -0400
commitf782201ebc2b5f6c7a22e586e8eb81fe1d9e4801 (patch)
treef76d4ca8cdc0bf5816cb135df358164b0e909519 /drivers/scsi/scsi_scan.c
parentscsi: core: Revert "Make sure that hosts outlive targets" (diff)
downloadlinux-dev-f782201ebc2b5f6c7a22e586e8eb81fe1d9e4801.tar.xz
linux-dev-f782201ebc2b5f6c7a22e586e8eb81fe1d9e4801.zip
scsi: core: Revert "Make sure that targets outlive devices"
Revert the patch series "Call blk_mq_free_tag_set() earlier" because it introduces a deadlock if the scsi_remove_host() caller holds a reference on a device, target or host. Link: https://lore.kernel.org/r/20220821220502.13685-5-bvanassche@acm.org Fixes: fe442604199e ("scsi: core: Make sure that targets outlive devices") Reported-by: syzbot+bafeb834708b1bb750bc@syzkaller.appspotmail.com Tested-by: Kenneth R. Crudup <kenny@panix.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 4c1efd6a3b0c..91ac901a6682 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -521,8 +521,6 @@ static struct scsi_target *scsi_alloc_target(struct device *parent,
starget->state = STARGET_CREATED;
starget->scsi_level = SCSI_2;
starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
- init_waitqueue_head(&starget->sdev_wq);
-
retry:
spin_lock_irqsave(shost->host_lock, flags);