aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-08-15 14:57:01 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:51:14 -0400
commit6fdea8dbbe4fc021afb601ef5339d5c5825c5cb6 (patch)
tree2b669ff314903bca1f2f356c5fb83bf9d4499e6c /drivers/scsi
parent34f8f0d294423a7e2ef84a741890b1bfa317aa4e (diff)
[SCSI] ide-scsi: Close narrow race in release
We were releasing the block devices before removing the host, so commands could still be coming in which would cause a panic. Just remove the host before releasing the block devices to close this race. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ide-scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 3b55a6c10b6b..d81bb076a15a 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -671,6 +671,7 @@ static void ide_scsi_remove(ide_drive_t *drive)
671 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); 671 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
672 struct gendisk *g = scsi->disk; 672 struct gendisk *g = scsi->disk;
673 673
674 scsi_remove_host(scsihost);
674 ide_proc_unregister_driver(drive, scsi->driver); 675 ide_proc_unregister_driver(drive, scsi->driver);
675 676
676 ide_unregister_region(g); 677 ide_unregister_region(g);
@@ -679,7 +680,6 @@ static void ide_scsi_remove(ide_drive_t *drive)
679 g->private_data = NULL; 680 g->private_data = NULL;
680 put_disk(g); 681 put_disk(g);
681 682
682 scsi_remove_host(scsihost);
683 ide_scsi_put(scsi); 683 ide_scsi_put(scsi);
684} 684}
685 685