The I/O submission and completion paths call into the device handler
without any synchronization agains detachment. So disallow detaching
device handlers at runtime.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
/*
* Detach from a device handler
*/
- scsi_dh_handler_detach(sdev);
- err = 0;
+ sdev_printk(KERN_WARNING, sdev,
+ "can't detach handler %s.\n",
+ sdev->handler->name);
+ err = -EINVAL;
} else if (!strncmp(buf, "activate", 8)) {
/*
* Activate a device handler