lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2141649-bda0-a980-4932-e01f79d03b9c@huawei.com>
Date: Fri, 28 Mar 2025 16:06:41 +0800
From: liulongfang <liulongfang@...wei.com>
To: Alex Williamson <alex.williamson@...hat.com>
CC: <jgg@...dia.com>, <shameerali.kolothum.thodi@...wei.com>,
	<jonathan.cameron@...wei.com>, <kvm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: Re: [PATCH v6 4/5] hisi_acc_vfio_pci: bugfix the problem of
 uninstalling driver

On 2025/3/21 23:51, Alex Williamson wrote:
> On Tue, 18 Mar 2025 14:45:47 +0800
> Longfang Liu <liulongfang@...wei.com> wrote:
> 
>> In a live migration scenario. If the number of VFs at the
>> destination is greater than the source, the recovery operation
>> will fail and qemu will not be able to complete the process and
>> exit after shutting down the device FD.
>>
>> This will cause the driver to be unable to be unloaded normally due
>> to abnormal reference counting of the live migration driver caused
>> by the abnormal closing operation of fd.
> 
> "Therefore, make sure the migration file descriptor references are
>  always released when the device is closed."
> 
> The commit log identifies the problem, but it's generally also useful
> to describe the resolution of the problem as well.  Thanks,
>

Okay, I will add these descriptions in the next release patchset.

Thanks.
Longfang.

> Alex
> 
>> Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration")
>> Signed-off-by: Longfang Liu <liulongfang@...wei.com>
>> Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>
>> ---
>>  drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
>> index d96446f499ed..cadc82419dca 100644
>> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
>> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
>> @@ -1508,6 +1508,7 @@ static void hisi_acc_vfio_pci_close_device(struct vfio_device *core_vdev)
>>  	struct hisi_acc_vf_core_device *hisi_acc_vdev = hisi_acc_get_vf_dev(core_vdev);
>>  	struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
>>  
>> +	hisi_acc_vf_disable_fds(hisi_acc_vdev);
>>  	mutex_lock(&hisi_acc_vdev->open_mutex);
>>  	hisi_acc_vdev->dev_opened = false;
>>  	iounmap(vf_qm->io_base);
> 
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ