mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
e959ed9a44
commit
d442277495
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue