Message ID | 1604685744-25125-1-git-send-email-kwankhede@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/1] Fix use after free in vfio_migration_probe | expand |
On Fri, 6 Nov 2020 at 18:35, Kirti Wankhede <kwankhede@nvidia.com> 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> > Reviewed-by: David Edmondson <dme@dme.org> > Reviewed-by: Alex Bennée <alex.bennee@linaro.org> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- Hi Alex -- this is a fix for a Coverity issue, are you planning a pullreq with it in? It would be nice to have it in rc2 next week. thanks -- PMM
On Thu, 12 Nov 2020 15:57:46 +0000 Peter Maydell <peter.maydell@linaro.org> wrote: > On Fri, 6 Nov 2020 at 18:35, Kirti Wankhede <kwankhede@nvidia.com> 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> > > Reviewed-by: David Edmondson <dme@dme.org> > > Reviewed-by: Alex Bennée <alex.bennee@linaro.org> > > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > > --- > > Hi Alex -- this is a fix for a Coverity issue, are you planning > a pullreq with it in? It would be nice to have it in rc2 next week. Hi Peter, Yes, I was planning to send a pull request. It's a trivial and obvious fix, so if by chance you'd like to grab it separately, you're also more than welcome. Acked-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Thanks, Alex
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: