linux-yocto/drivers/pci/endpoint
Damien Le Moal 6ee4578274 PCI: endpoint: Fix configfs group removal on driver teardown
commit 910bdb8197 upstream.

An endpoint driver configfs attributes group is added to the
epf_group list of struct pci_epf_driver by pci_epf_add_cfs() but an
added group is not removed from this list when the attribute group is
unregistered with pci_ep_cfs_remove_epf_group().

Add the missing list_del() call in pci_ep_cfs_remove_epf_group()
to correctly remove the attribute group from the driver list.

With this change, once the loop over all attribute groups in
pci_epf_remove_cfs() completes, the driver epf_group list should be
empty. Add a WARN_ON() to make sure of that.

Fixes: ef1433f717 ("PCI: endpoint: Create configfs entry for each pci_epf_device_id table entry")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250624114544.342159-3-dlemoal@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:28:36 +02:00
..
functions PCI: endpoint: pci-epf-vntb: Fix the incorrect usage of __iomem attribute 2025-08-15 12:08:55 +02:00
Kconfig
Makefile
pci-ep-cfs.c PCI: endpoint: Fix configfs group removal on driver teardown 2025-08-28 16:28:36 +02:00
pci-epc-core.c PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() 2025-02-08 09:52:23 +01:00
pci-epc-mem.c
pci-epf-core.c PCI: endpoint: Fix configfs group removal on driver teardown 2025-08-28 16:28:36 +02:00