Patch "virtio-vdpa: Fix unchecked call to NULL set_vq_affinity" has been added to the 6.4-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

    virtio-vdpa: Fix unchecked call to NULL set_vq_affinity

to the 6.4-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:
     virtio-vdpa-fix-unchecked-call-to-null-set_vq_affini.patch
and it can be found in the queue-6.4 subdirectory.

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



commit a950f379add9efcf3507df24e7b5c08ff599c89a
Author: Dragos Tatulea <dtatulea@xxxxxxxxxx>
Date:   Thu May 4 16:50:52 2023 +0300

    virtio-vdpa: Fix unchecked call to NULL set_vq_affinity
    
    [ Upstream commit fe37efba475375caa2dbc71cb06f53f7086277ef ]
    
    The referenced patch calls set_vq_affinity without checking if the op is
    valid. This patch adds the check.
    
    Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism")
    Reviewed-by: Gal Pressman <gal@xxxxxxxxxx>
    Signed-off-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
    Message-Id: <20230504135053.2283816-1-dtatulea@xxxxxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Reviewed-by: Feng Liu <feliu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index eb6aee8c06b2c..989e2d7184ce4 100644
--- a/drivers/virtio/virtio_vdpa.c
+++ b/drivers/virtio/virtio_vdpa.c
@@ -385,7 +385,9 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
 			err = PTR_ERR(vqs[i]);
 			goto err_setup_vq;
 		}
-		ops->set_vq_affinity(vdpa, i, &masks[i]);
+
+		if (ops->set_vq_affinity)
+			ops->set_vq_affinity(vdpa, i, &masks[i]);
 	}
 
 	cb.callback = virtio_vdpa_config_cb;



[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