* [PATCH 1/1] Change the order of g_free(info) and tracepoint
@ 2020-11-06 13:39 Kirti Wankhede
2020-11-06 15:59 ` David Edmondson
2020-11-06 16:44 ` Alex Bennée
0 siblings, 2 replies; 4+ messages in thread
From: Kirti Wankhede @ 2020-11-06 13:39 UTC (permalink / raw)
To: alex.williamson, cjia; +Cc: mcrossley, Kirti Wankhede, qemu-devel, dnigam
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint
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é
2020-11-06 16:44 ` Alex Bennée
1 sibling, 1 reply; 4+ messages in thread
From: David Edmondson @ 2020-11-06 15:59 UTC (permalink / raw)
To: Kirti Wankhede, alex.williamson, cjia
Cc: mcrossley, Kirti Wankhede, qemu-devel, dnigam
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?
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.
--
I think I waited too long, I'm moving into the dollhouse.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint
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:44 ` Alex Bennée
1 sibling, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2020-11-06 16:44 UTC (permalink / raw)
To: Kirti Wankhede; +Cc: mcrossley, alex.williamson, cjia, dnigam, qemu-devel
Kirti Wankhede <kwankhede@nvidia.com> writes:
> 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>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Change the order of g_free(info) and tracepoint
2020-11-06 15:59 ` David Edmondson
@ 2020-11-06 16:57 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-06 16:57 UTC (permalink / raw)
To: David Edmondson, Kirti Wankhede, alex.williamson, cjia
Cc: mcrossley, qemu-devel, dnigam
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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-06 16:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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é
2020-11-06 16:44 ` Alex Bennée
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.