This is a note to let you know that I've just added the patch titled virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs() 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-cpumask-memory-leak-in-virtio_vdpa_f.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 8adfa3dcbd345ff83232e802c48a19c66bef9858 Author: Gal Pressman <gal@xxxxxxxxxx> Date: Wed Jul 26 22:10:07 2023 +0300 virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs() [ Upstream commit df9557046440b0a62250fee3169a8f6a139f55a6 ] Free the cpumask allocated by create_affinity_masks() before returning from the function. Fixes: 3dad56823b53 ("virtio-vdpa: Support interrupt affinity spreading mechanism") Signed-off-by: Gal Pressman <gal@xxxxxxxxxx> Reviewed-by: Dragos Tatulea <dtatulea@xxxxxxxxxx> Message-Id: <20230726191036.14324-1-dtatulea@xxxxxxxxxx> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Acked-by: Jason Wang <jasowang@xxxxxxxxxx> Reviewed-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 989e2d7184ce4..961161da59000 100644 --- a/drivers/virtio/virtio_vdpa.c +++ b/drivers/virtio/virtio_vdpa.c @@ -393,11 +393,13 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs, cb.callback = virtio_vdpa_config_cb; cb.private = vd_dev; ops->set_config_cb(vdpa, &cb); + kfree(masks); return 0; err_setup_vq: virtio_vdpa_del_vqs(vdev); + kfree(masks); return err; }