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: <20251124181644.GW233636@ziepe.ca>
Date: Mon, 24 Nov 2025 14:16:44 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: ankita@...dia.com
Cc: yishaih@...dia.com, skolothumtho@...dia.com, kevin.tian@...el.com,
	alex@...zbot.org, aniketa@...dia.com, vsethi@...dia.com,
	mochs@...dia.com, Yunxiang.Li@....com, yi.l.liu@...el.com,
	zhangdongdong@...incomputing.com, avihaih@...dia.com,
	bhelgaas@...gle.com, peterx@...hat.com, pstanner@...hat.com,
	apopple@...dia.com, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, cjia@...dia.com, kwankhede@...dia.com,
	targupta@...dia.com, zhiw@...dia.com, danw@...dia.com,
	dnigam@...dia.com, kjaju@...dia.com
Subject: Re: [PATCH v5 6/7] vfio/nvgrace-gpu: Inform devmem unmapped after
 reset

On Mon, Nov 24, 2025 at 11:59:25AM +0000, ankita@...dia.com wrote:
> @@ -1048,12 +1050,29 @@ static const struct pci_device_id nvgrace_gpu_vfio_pci_table[] = {
>  
>  MODULE_DEVICE_TABLE(pci, nvgrace_gpu_vfio_pci_table);
>  
> +static void nvgrace_gpu_vfio_pci_reset_done(struct pci_dev *pdev)
> +{
> +	struct vfio_pci_core_device *core_device = dev_get_drvdata(&pdev->dev);
> +	struct nvgrace_gpu_pci_core_device *nvdev =
> +		container_of(core_device, struct nvgrace_gpu_pci_core_device,
> +			     core_device);
> +
> +	lockdep_assert_held_write(&core_device->memory_lock);
> +
> +	nvdev->reset_done = true;
> +}

Seems surprising/wrong at least needs a comment. What on earth is
ensuring that lockdep within a PCI callback??

>  static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
>  	.name = KBUILD_MODNAME,
>  	.id_table = nvgrace_gpu_vfio_pci_table,
>  	.probe = nvgrace_gpu_probe,
>  	.remove = nvgrace_gpu_remove,
> -	.err_handler = &vfio_pci_core_err_handlers,
> +	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ