All of lore.kernel.org
 help / color / mirror / Atom feed
From: P J P <ppandit@redhat.com>
To: Li Qiang <liq3ea@163.com>
Cc: marcandre.lureau@redhat.com, liq3ea@gmail.com, kraxel@redhat.com,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 2/7] vhost-user-gpu: fix resource leak in 'vg_resource_create_2d'
Date: Wed, 5 May 2021 12:58:19 +0530 (IST)	[thread overview]
Message-ID: <nq21421n-o484-q2q6-np2n-qqop966oqn3@erqung.pbz> (raw)
In-Reply-To: <20210505045824.33880-3-liq3ea@163.com>

+-- On Tue, 4 May 2021, Li Qiang wrote --+
| Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
| 
| Signed-off-by: Li Qiang <liq3ea@163.com>
| ---
|  contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
|  1 file changed, 1 insertion(+)
| 
| diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
| index f73f292c9f..b5e153d0d6 100644
| --- a/contrib/vhost-user-gpu/vhost-user-gpu.c
| +++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
| @@ -349,6 +349,7 @@ vg_resource_create_2d(VuGpu *g,
|          g_critical("%s: resource creation failed %d %d %d",
|                     __func__, c2d.resource_id, c2d.width, c2d.height);
|          g_free(res);
| +        vugbm_buffer_destroy(&res->buffer);
|          cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
|          return;
|      }

* Looks good.

Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>

Thank you.
--
 - P J P
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D



  reply	other threads:[~2021-05-05  7:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05  4:58 [PATCH 0/7] vhost-user-gpu: fix several security issues Li Qiang
2021-05-05  4:58 ` [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info Li Qiang
2021-05-05  7:23   ` P J P
2021-05-05  9:07     ` Li Qiang
2021-05-06  5:53       ` P J P
2021-05-06  7:49         ` Li Qiang
2021-05-05  4:58 ` [PATCH 2/7] vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' Li Qiang
2021-05-05  7:28   ` P J P [this message]
2021-05-05  4:58 ` [PATCH 3/7] vhost-user-gpu: fix memory leak in vg_resource_attach_backing Li Qiang
2021-05-05  7:39   ` P J P
2021-05-05  9:11     ` Li Qiang
2021-05-05  4:58 ` [PATCH 4/7] vhost-user-gpu: fix memory link while calling 'vg_resource_unref' Li Qiang
2021-05-05  7:42   ` P J P
2021-05-05  4:58 ` [PATCH 5/7] vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' Li Qiang
2021-05-05  7:48   ` P J P
2021-05-05  9:14     ` Li Qiang
2021-05-05  4:58 ` [PATCH 6/7] vhost-user-gpu: fix memory leak in 'virgl_resource_attach_backing' Li Qiang
2021-05-05  7:55   ` P J P
2021-05-05  9:07     ` Marc-André Lureau
2021-05-05  9:23       ` Li Qiang
2021-05-05  9:33         ` Marc-André Lureau
2021-05-05  4:58 ` [PATCH 7/7] vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset' Li Qiang
2021-05-05  7:58   ` P J P
2021-05-05  9:10 ` [PATCH 0/7] vhost-user-gpu: fix several security issues Marc-André Lureau
2021-05-05  9:27   ` Li Qiang
2021-05-05  9:35     ` Marc-André Lureau
2021-05-10 19:25       ` Philippe Mathieu-Daudé
2021-05-11  2:49         ` Li Qiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nq21421n-o484-q2q6-np2n-qqop966oqn3@erqung.pbz \
    --to=ppandit@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=liq3ea@163.com \
    --cc=liq3ea@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.