diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2025-07-31 16:11:45 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-07-31 16:11:45 -0500 |
| commit | b8222fe27cc2b68e08989f4b91c6dcd5b69dbc25 (patch) | |
| tree | 4b18252321135aa157513b0e26963f0ff86242d9 | |
| parent | 11fdf08767d101eb72bb1ab1365cde605ebff18b (diff) | |
| parent | 910bdb8197f9322790c738bb32feaa11dba26909 (diff) | |
Merge branch 'pci/endpoint/core'
- Fix configfs epf_group removal, which incorrectly did a list_del() on a
list head, not a list entry (Damien Le Moal)
* pci/endpoint/core:
PCI: endpoint: Fix configfs group removal on driver teardown
PCI: endpoint: Fix configfs group list head handling
| -rw-r--r-- | drivers/pci/endpoint/pci-ep-cfs.c | 1 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-epf-core.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index d712c7a866d2..ef50c82e647f 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -691,6 +691,7 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group) if (IS_ERR_OR_NULL(group)) return; + list_del(&group->group_entry); configfs_unregister_default_group(group); } EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index 577a9e490115..167dc6ee63f7 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -338,7 +338,7 @@ static void pci_epf_remove_cfs(struct pci_epf_driver *driver) mutex_lock(&pci_epf_mutex); list_for_each_entry_safe(group, tmp, &driver->epf_group, group_entry) pci_ep_cfs_remove_epf_group(group); - list_del(&driver->epf_group); + WARN_ON(!list_empty(&driver->epf_group)); mutex_unlock(&pci_epf_mutex); } |
