Patch "s390/virtio_ccw: Fix config change notifications" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/virtio_ccw: Fix config change notifications

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-virtio_ccw-fix-config-change-notifications.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8a83fbb5fbc46042655a870bacafc753d8ed163b
Author: Halil Pasic <pasic@xxxxxxxxxxxxx>
Date:   Tue Jun 11 23:47:16 2024 +0200

    s390/virtio_ccw: Fix config change notifications
    
    [ Upstream commit d8354a1de2c4cc693812f6130fc922537a59217d ]
    
    Commit e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
    broke configuration change notifications for virtio-ccw by putting the
    DMA address of *indicatorp directly into ccw->cda disregarding the fact
    that if !!(vcdev->is_thinint) then the function
    virtio_ccw_register_adapter_ind() will overwrite that ccw->cda value
    with the address of the virtio_thinint_area so it can actually set up
    the adapter interrupts via CCW_CMD_SET_IND_ADAPTER.  Thus we end up
    pointing to the wrong object for both CCW_CMD_SET_IND if setting up the
    adapter interrupts fails, and for CCW_CMD_SET_CONF_IND regardless
    whether it succeeds or fails.
    
    To fix this, let us save away the dma address of *indicatorp in a local
    variable, and copy it to ccw->cda after the "vcdev->is_thinint" branch.
    
    Fixes: e3e9bda38e6d ("s390/virtio_ccw: use DMA handle from DMA API")
    Reported-by: Boqiao Fu <bfu@xxxxxxxxxx>
    Reported-by: Sebastian Mitterle <smitterl@xxxxxxxxxx>
    Closes: https://issues.redhat.com/browse/RHEL-39983
    Tested-by: Thomas Huth <thuth@xxxxxxxxxx>
    Reviewed-by: Eric Farman <farman@xxxxxxxxxxxxx>
    Signed-off-by: Halil Pasic <pasic@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240611214716.1002781-1-pasic@xxxxxxxxxxxxx
    Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index d7569f3955591..d6491fc84e8c5 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -698,6 +698,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
 	dma64_t *indicatorp = NULL;
 	int ret, i, queue_idx = 0;
 	struct ccw1 *ccw;
+	dma32_t indicatorp_dma = 0;
 
 	ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw), NULL);
 	if (!ccw)
@@ -725,7 +726,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
 	*/
 	indicatorp = ccw_device_dma_zalloc(vcdev->cdev,
 					   sizeof(*indicatorp),
-					   &ccw->cda);
+					   &indicatorp_dma);
 	if (!indicatorp)
 		goto out;
 	*indicatorp = indicators_dma(vcdev);
@@ -735,6 +736,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
 			/* no error, just fall back to legacy interrupts */
 			vcdev->is_thinint = false;
 	}
+	ccw->cda = indicatorp_dma;
 	if (!vcdev->is_thinint) {
 		/* Register queue indicators with host. */
 		*indicators(vcdev) = 0;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux