Skip to content

Commit

Permalink
[SCSI] ide-scsi: Close narrow race in release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox authored and James Bottomley committed Oct 12, 2007
1 parent 34f8f0d commit 6fdea8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ static void ide_scsi_remove(ide_drive_t *drive)
struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
struct gendisk *g = scsi->disk;

scsi_remove_host(scsihost);
ide_proc_unregister_driver(drive, scsi->driver);

ide_unregister_region(g);
Expand All @@ -679,7 +680,6 @@ static void ide_scsi_remove(ide_drive_t *drive)
g->private_data = NULL;
put_disk(g);

scsi_remove_host(scsihost);
ide_scsi_put(scsi);
}

Expand Down

0 comments on commit 6fdea8d

Please sign in to comment.