Re: [PATCH v5 6/7] vfio/nvgrace-gpu: Inform devmem unmapped after reset

From: Ankit Agrawal
Date: Mon Nov 24 2025 - 21:52:51 EST


>> +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??

Yeah, I noticed that even on vfio_pci_core_enable in the open, the lock
isn't taken. I'll remove it.