提交 d4422774 编写于 作者: C Christoph Hellwig 提交者: James Bottomley

scsi_dh: don't allow to detach device handlers at runtime

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 e959ed9a
......@@ -181,8 +181,10 @@ store_dh_state(struct device *dev, struct device_attribute *attr,
/*
* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册