- 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
Unified · Split
| @@ -691,6 +691,7 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group) · 690 unmodified lines | ||
| 691 | 691 | if (IS_ERR_OR_NULL(group)) |
| 692 | 692 | return; |
| 693 | 693 | |
| 694 | + list_del(&group->group_entry); | |
| 694 | 695 | configfs_unregister_default_group(group); |
| 695 | 696 | } |
| 696 | 697 | EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); |
| @@ -338,7 +338,7 @@ static void pci_epf_remove_cfs(struct pci_epf_driver *driver) · 337 unmodified lines | ||
| 338 | 338 | mutex_lock(&pci_epf_mutex); |
| 339 | 339 | list_for_each_entry_safe(group, tmp, &driver->epf_group, group_entry) |
| 340 | 340 | pci_ep_cfs_remove_epf_group(group); |
| 341 | − list_del(&driver->epf_group); | |
| 341 | + WARN_ON(!list_empty(&driver->epf_group)); | |
| 342 | 342 | mutex_unlock(&pci_epf_mutex); |
| 343 | 343 | } |
| 344 | 344 | |