Skip to content

Commit b8222fe

Browse files
committed
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
2 parents 11fdf08 + 910bdb8 commit b8222fe

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/pci/endpoint/pci-ep-cfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group)
691691
if (IS_ERR_OR_NULL(group))
692692
return;
693693

694+
list_del(&group->group_entry);
694695
configfs_unregister_default_group(group);
695696
}
696697
EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group);

drivers/pci/endpoint/pci-epf-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static void pci_epf_remove_cfs(struct pci_epf_driver *driver)
338338
mutex_lock(&pci_epf_mutex);
339339
list_for_each_entry_safe(group, tmp, &driver->epf_group, group_entry)
340340
pci_ep_cfs_remove_epf_group(group);
341-
list_del(&driver->epf_group);
341+
WARN_ON(!list_empty(&driver->epf_group));
342342
mutex_unlock(&pci_epf_mutex);
343343
}
344344

0 commit comments

Comments
 (0)