On Fri, 23 Sep 2022 18:02:42 -0600, Uday Shankar wrote: > Userspace can currently write to sysfs to transition sdev_state to > RUNNING or OFFLINE from any source state. This causes issues because > proper transitioning out of some states involves steps besides just > changing sdev_state, so allowing userspace to change sdev_state > regardless of the source state can result in inconsistencies; e.g. with > iscsi we can end up with sdev_state == SDEV_RUNNING while the device > queue is quiesced. Any task attempting IO on the device will then hang, > and in more recent kernels, iscsid will hang as well. More detail about > this bug is provided in my first attempt: > https://groups.google.com/g/open-iscsi/c/PNKca4HgPDs/m/CXaDkntOAQAJ > > [...] Applied to 6.1/scsi-fixes, thanks! [1/1] restrict legal sdev_state transitions via sysfs https://git.kernel.org/mkp/scsi/c/2331ce6126be -- Martin K. Petersen Oracle Linux Engineering