Skip to content
Commit 529244bd authored by James Bottomley's avatar James Bottomley Committed by Martin K. Petersen
Browse files

scsi: enclosure: Fix stale device oops with hot replug

Doing an add/remove/add on a SCSI device in an enclosure leads to an oops
caused by poisoned values in the enclosure device list pointers.  The
reason is because we are keeping the enclosure device across the enclosed
device add/remove/add but the current code is doing a
device_add/device_del/device_add on it.  This is the wrong thing to do in
sysfs, so fix it by not doing a device_del on the enclosure device simply
because of a hot remove of the drive in the slot.

[mkp: added missing email addresses]

Fixes: 43d8eb9c ("[SCSI] ses: add support for enclosure component hot removal")
Link: https://lore.kernel.org/r/1578532892.3852.10.camel@HansenPartnership.com


Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Reported-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Tested-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 465f4eda
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment