qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: David Edmondson <dme@dme.org>,
	Kirti Wankhede <kwankhede@nvidia.com>,
	alex.williamson@redhat.com, cjia@nvidia.com
Cc: mcrossley@nvidia.com, qemu-devel@nongnu.org, dnigam@nvidia.com
Subject: Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint
Date: Fri, 6 Nov 2020 17:57:15 +0100	[thread overview]
Message-ID: <5eccaf99-3fad-f24a-6cbb-439ac83c34b2@redhat.com> (raw)
In-Reply-To: <cunr1p6tr1h.fsf@zarquon.hh.sledj.net>

On 11/6/20 4:59 PM, David Edmondson wrote:
> On Friday, 2020-11-06 at 19:09:24 +0530, Kirti Wankhede wrote:
> 
>> Fixes Coverity issue:
>> CID 1436126:  Memory - illegal accesses  (USE_AFTER_FREE)
>>
>> Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize
>> function")
>>
>> Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
> 
> Maybe "fix use after free in vfio_migration_probe" as a summary?

Yes please :)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> 
> Reviewed-by: David Edmondson <dme@dme.org>
> 
>> ---
>>  hw/vfio/migration.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
>> index 3ce285ea395d..55261562d4f3 100644
>> --- a/hw/vfio/migration.c
>> +++ b/hw/vfio/migration.c
>> @@ -897,8 +897,8 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
>>          goto add_blocker;
>>      }
>>  
>> -    g_free(info);
>>      trace_vfio_migration_probe(vbasedev->name, info->index);
>> +    g_free(info);
>>      return 0;
>>  
>>  add_blocker:
>> -- 
>> 2.7.0
> 
> dme.
> 



  reply	other threads:[~2020-11-06 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 13:39 [PATCH 1/1] Change the order of g_free(info) and tracepoint Kirti Wankhede
2020-11-06 15:59 ` David Edmondson
2020-11-06 16:57   ` Philippe Mathieu-Daudé [this message]
2020-11-06 16:44 ` Alex Bennée

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=5eccaf99-3fad-f24a-6cbb-439ac83c34b2@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=cjia@nvidia.com \
    --cc=dme@dme.org \
    --cc=dnigam@nvidia.com \
    --cc=kwankhede@nvidia.com \
    --cc=mcrossley@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).