[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220209164440.0d77284c.alex.williamson@redhat.com>
Date: Wed, 9 Feb 2022 16:44:40 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>
Cc: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-crypto@...r.kernel.org>, <jgg@...dia.com>,
<cohuck@...hat.com>, <mgurtovoy@...dia.com>, <yishaih@...dia.com>,
<linuxarm@...wei.com>, <liulongfang@...wei.com>,
<prime.zeng@...ilicon.com>, <jonathan.cameron@...wei.com>,
<wangzhou1@...ilicon.com>
Subject: Re: [RFC v4 7/8] hisi_acc_vfio_pci: Add support for VFIO live
migration
On Tue, 8 Feb 2022 13:34:24 +0000
Shameer Kolothum <shameerali.kolothum.thodi@...wei.com> wrote:
> +
> +static struct hisi_acc_vf_migration_file *
> +hisi_acc_vf_stop_copy(struct hisi_acc_vf_core_device *hisi_acc_vdev)
> +{
> + struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
> + struct device *dev = &hisi_acc_vdev->vf_dev->dev;
> + struct hisi_acc_vf_migration_file *migf;
> + int ret;
> +
> + if (unlikely(qm_wait_dev_not_ready(vf_qm))) {
> + dev_info(dev, "QM device not ready, no data to transfer\n");
> + return 0;
> + }
This return value looks suspicious and I think would cause a segfault
in the calling code:
+ migf = hisi_acc_vf_stop_copy(hisi_acc_vdev);
+ if (IS_ERR(migf))
+ return ERR_CAST(migf);
+ get_file(migf->filp);
+ hisi_acc_vdev->saving_migf = migf;
+ return migf->filp;
Thanks,
Alex
Powered by blists - more mailing lists