On Wed, Nov 22, 2023 at 08:06:08PM +0000, gregkh@linuxfoundation.org wrote:
The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 83a939f0fdc208ff3639dd3d42ac9b3c35607fd2 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2023112207-dealmaker-frigidly-e080@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
83a939f0fdc2 ("PCI: exynos: Don't discard .remove() callback") 778f7c194b1d ("PCI: dwc: exynos: Rework the driver to support Exynos5433 variant") b9ac0f9dc8ea ("PCI: dwc: Move dw_pcie_setup_rc() to DWC common code") 59fbab1ae40e ("PCI: dwc: Move dw_pcie_msi_init() into core") 886a9c134755 ("PCI: dwc: Move link handling into common code") 331e9bcead52 ("PCI: dwc: Drop the .set_num_vectors() host op") a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------ With CONFIG_PCI_EXYNOS=y and exynos_pcie_remove() marked with __exit, the function is discarded from the driver. In this case a bound device can still get unbound, e.g via sysfs. Then no cleanup code is run resulting in resource leaks or worse.
The right thing to do is do always have the remove callback available. This fixes the following warning by modpost:
WARNING: modpost: drivers/pci/controller/dwc/pci-exynos: section mismatch in reference: exynos_pcie_driver+0x8 (section: .data) -> exynos_pcie_remove (section: .exit.text)
(with ARCH=x86_64 W=1 allmodconfig).
Fixes: 340cba6092c2 ("pci: Add PCIe driver for Samsung Exynos")
Actually this is wrong. The right Fixes: line would have been:
Fixes: 778f7c194b1d ("PCI: dwc: exynos: Rework the driver to support Exynos5433 variant")
which entered the mainline in v5.11-rc1, so not backporting it to 5.10 and older stables is the right thing to do.
Best regards Uwe