Skip to contentSkip to conversation

ibmvscsi: don't send host info in adapter info MAD after LPM

PATCH Applied Tyrel Datwyler 2 participants 2 messages Jun 3, 2020 – Jun 10, 2020

Subsystems (3)
lore
Share & tools
lore

Tyrel Datwyler

author maintainer
#0 lore raw

PATCH 1/1 ibmvscsi: don't send host info in adapter info MAD after LPM

The adatper info MAD is used to send the client info and receive the host info as a response. A peristent buffer is used and as such the client info is overwritten after the response. During the course of a normal adapter reset the client info is refreshed in the buffer in preparation for sending the adapter info MAD.

However, in the special case of LPM where we reenable the CRQ instead of a full CRQ teardown and reset we fail to refresh the client info in the adapter info buffer. As a result after Live Partition Migration (LPM) we erroneously report the hosts info as our own.

---
 drivers/scsi/ibmvscsi/ibmvscsi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/ibmvscsi/ibmvscsi.c +2 -0
index 59f0f1030c54..c5711c659b51 100644
@@ -415,6 +415,8 @@ static int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
 	int rc = 0;
 	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
 
+	set_adapter_info(hostdata);
+
 	/* Re-enable the CRQ */
 	do {
 		if (rc)
Signature · 1 line
2.26.1
#1 lore raw
Quoted 10 lines · Tyrel Datwyler

The adatper info MAD is used to send the client info and receive the host info as a response. A peristent buffer is used and as such the client info is overwritten after the response. During the course of a normal adapter reset the client info is refreshed in the buffer in preparation for sending the adapter info MAD.

However, in the special case of LPM where we reenable the CRQ instead of a full CRQ teardown and reset we fail to refresh the client info in the adapter info buffer. As a result after Live Partition Migration (LPM) we erroneously report the hosts info as our own.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM

      https://git.kernel.org/mkp/scsi/c/4919b33b63c8
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering