[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPapy8nuqO3EETQB@google.com>
Date: Mon, 20 Oct 2025 21:29:47 +0000
From: David Matlack <dmatlack@...gle.com>
To: Vipin Sharma <vipinsh@...gle.com>
Cc: bhelgaas@...gle.com, alex.williamson@...hat.com,
pasha.tatashin@...een.com, jgg@...pe.ca, graf@...zon.com,
pratyush@...nel.org, gregkh@...uxfoundation.org, chrisl@...nel.org,
rppt@...nel.org, skhawaja@...gle.com, parav@...dia.com,
saeedm@...dia.com, kevin.tian@...el.com, jrhilke@...gle.com,
david@...hat.com, jgowans@...zon.com, dwmw2@...radead.org,
epetron@...zon.de, junaids@...gle.com, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [RFC PATCH 12/21] vfio/pci: Skip clearing bus master on live
update restored device
On 2025-10-17 05:07 PM, Vipin Sharma wrote:
> @@ -167,6 +173,9 @@ static int vfio_pci_liveupdate_retrieve(struct liveupdate_file_handler *handler,
> */
> filep->f_mapping = device->inode->i_mapping;
> *file = filep;
> + vdev = container_of(device, struct vfio_pci_core_device, vdev);
> + guard(mutex)(&device->dev_set->lock);
> + vdev->liveupdate_restore = ser;
FYI, this causes a build failure for me:
drivers/vfio/pci/vfio_pci_liveupdate.c:381:3: error: cannot jump from this goto statement to its label
381 | goto err_get_registration;
| ^
drivers/vfio/pci/vfio_pci_liveupdate.c:394:2: note: jump bypasses initialization of variable with __attribute__((cleanup))
394 | guard(mutex)(&device->dev_set->lock);
| ^
It seems you cannot jump past a guard(). Replacing the guard with
lock/unlock fixes it, and so does putting the guard into its own inner
statement.
Powered by blists - more mailing lists