[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP devic
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PATCH v10 5/6] s390x/vfio: ap: Introduce VFIO AP device |
Date: |
Wed, 10 Oct 2018 14:49:41 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 10/10/2018 02:37 PM, Pierre Morel wrote:
> On 09/10/2018 19:52, Tony Krowiak wrote:
>> +static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp)
>> +{
>> + GError *gerror;
>> + char *symlink, *group_path;
>> + int groupid;
>> +
>> + symlink = g_strdup_printf("%s/iommu_group", vapdev->vdev.sysfsdev);
>> + group_path = g_file_read_link(symlink, &gerror);
>
>
> hum I oversaw this change, it leads to segfault.
Yes, this was a review feedback from v9 to use the glib function.
>
> You must initialize gerror before use.
> The following patch avoid a segmentation fault:
>
>
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 5543406afc..3b8e9ba6dc 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -59,7 +59,7 @@ static void vfio_ap_put_device(VFIOAPDevice *vapdev)
>
> static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp)
> {
> - GError *gerror;
> + GError *gerror = NULL;
> char *symlink, *group_path;
> int groupid;
With that fix, series
Tested-by: Christian Borntraeger <address@hidden>
Tony, can you fold that fixup from Pierre into your v11?
[Qemu-devel] [PATCH v10 6/6] s390: doc: detailed specifications for AP virtualization, Tony Krowiak, 2018/10/09