History

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

Bjorn Helgaas committed 1 year ago

Commit b8222fe2 parents 11fdf08 910bdb82 files · +2 −1Browse files

Unified · Split

2 files
  1. drivers/pci/endpoint/pci-ep-cfs.c +1 −0
  2. drivers/pci/endpoint/pci-epf-core.c +1 −1
drivers/pci/endpoint/pci-ep-cfs.c+1−0
@@ -691,6 +691,7 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group) · 690 unmodified lines
691 if (IS_ERR_OR_NULL(group))691 if (IS_ERR_OR_NULL(group))
692 return;692 return;
693 693
694 list_del(&group->group_entry);
694 configfs_unregister_default_group(group);695 configfs_unregister_default_group(group);
695}696}
696EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group);697EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group);
drivers/pci/endpoint/pci-epf-core.c+1−1
@@ -338,7 +338,7 @@ static void pci_epf_remove_cfs(struct pci_epf_driver *driver) · 337 unmodified lines
338 mutex_lock(&pci_epf_mutex);338 mutex_lock(&pci_epf_mutex);
339 list_for_each_entry_safe(group, tmp, &driver->epf_group, group_entry)339 list_for_each_entry_safe(group, tmp, &driver->epf_group, group_entry)
340 pci_ep_cfs_remove_epf_group(group);340 pci_ep_cfs_remove_epf_group(group);
341 list_del(&driver->epf_group);341 WARN_ON(!list_empty(&driver->epf_group));
342 mutex_unlock(&pci_epf_mutex);342 mutex_unlock(&pci_epf_mutex);
343}343}
344 344