virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs()
Subsystems (2)
PATCH 1/1 virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs()
From: Gal Pressman <[email protected]>
Free the cpumask allocated by create_affinity_masks() before returning from the function.
--- drivers/virtio/virtio_vdpa.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/virtio/virtio_vdpa.c +2 -0
@@ -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; }
Signature · 1 line
2.41.0
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
Rule: 'Cc: [email protected]' or 'commit <sha1> upstream.'
Subject: [PATCH] virtio-vdpa: Fix cpumask memory leak in virtio_vdpa_find_vqs()
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 9 lines · Dragos Tatulea
From: Gal Pressman <[email protected]>
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 <[email protected]>Reviewed-by Dragos Tatulea <[email protected]>
Thanks
Quoted 23 lines
--- drivers/virtio/virtio_vdpa.c | 2 ++ 1 file changed, 2 insertions(+)drivers/virtio/virtio_vdpa.c +2
-1@@ -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; } --
Quoted 2 lines
2.41.0
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Quoted 9 lines · Dragos Tatulea
From: Gal Pressman <[email protected]>
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 <[email protected]>Reviewed-by Dragos Tatulea <[email protected]>
Thanks,
Yongji