From 27600805e62f800bacf990354632eae4e487d34c Mon Sep 17 00:00:00 2001 From: Yazen Ghannam Date: Thu, 3 Sep 2026 10:43:25 -0500 Subject: x86/amd_node: Fix PCI device reference counting in amd_smn_init() The local "root" pointer is a temporary variable used during the device search. Therefore, refcount related to the search iterators should be cleaned up after the search is complete. Use the __free() cleanup macro to ensure the refcount is decremented when the temporary pointer goes out of scope. Additionally, increment the refcount when caching a root pointer. This ensures the in-use refcount is separate from the temporary search refcounting. Finally, drop the redundant "root = NULL" before the second search loop. The pci_get_class() iterator always decrements the refcount of its "from" argument, so the first loop can only fall through with "root" already NULL. Fixes: 0a4b61d9c2e4 ("x86/amd_node: Fix AMD root device caching") Closes: https://sashiko.dev/#/patchset/20260806160159.230453-1-jason.andryuk%40amd.com Reported-by: Sashiko Assisted-by: LLM Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello (AMD) Cc: Link: https://patch.msgid.link/20260903154325.74343-1-yazen.ghannam@amd.com --- fs/nls/Makefile | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 fs/nls/Makefile (limited to 'fs/nls/Makefile') diff --git a/fs/nls/Makefile b/fs/nls/Makefile new file mode 100644 index 000000000..5062c699d --- /dev/null +++ b/fs/nls/Makefile @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for native language support +# + +obj-$(CONFIG_NLS) += nls_base.o + +obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o +obj-$(CONFIG_NLS_CODEPAGE_737) += nls_cp737.o +obj-$(CONFIG_NLS_CODEPAGE_775) += nls_cp775.o +obj-$(CONFIG_NLS_CODEPAGE_850) += nls_cp850.o +obj-$(CONFIG_NLS_CODEPAGE_852) += nls_cp852.o +obj-$(CONFIG_NLS_CODEPAGE_855) += nls_cp855.o +obj-$(CONFIG_NLS_CODEPAGE_857) += nls_cp857.o +obj-$(CONFIG_NLS_CODEPAGE_860) += nls_cp860.o +obj-$(CONFIG_NLS_CODEPAGE_861) += nls_cp861.o +obj-$(CONFIG_NLS_CODEPAGE_862) += nls_cp862.o +obj-$(CONFIG_NLS_CODEPAGE_863) += nls_cp863.o +obj-$(CONFIG_NLS_CODEPAGE_864) += nls_cp864.o +obj-$(CONFIG_NLS_CODEPAGE_865) += nls_cp865.o +obj-$(CONFIG_NLS_CODEPAGE_866) += nls_cp866.o +obj-$(CONFIG_NLS_CODEPAGE_869) += nls_cp869.o +obj-$(CONFIG_NLS_CODEPAGE_874) += nls_cp874.o +obj-$(CONFIG_NLS_CODEPAGE_932) += nls_cp932.o nls_euc-jp.o +obj-$(CONFIG_NLS_CODEPAGE_936) += nls_cp936.o +obj-$(CONFIG_NLS_CODEPAGE_949) += nls_cp949.o +obj-$(CONFIG_NLS_CODEPAGE_950) += nls_cp950.o +obj-$(CONFIG_NLS_CODEPAGE_1250) += nls_cp1250.o +obj-$(CONFIG_NLS_CODEPAGE_1251) += nls_cp1251.o +obj-$(CONFIG_NLS_ASCII) += nls_ascii.o +obj-$(CONFIG_NLS_ISO8859_1) += nls_iso8859-1.o +obj-$(CONFIG_NLS_ISO8859_2) += nls_iso8859-2.o +obj-$(CONFIG_NLS_ISO8859_3) += nls_iso8859-3.o +obj-$(CONFIG_NLS_ISO8859_4) += nls_iso8859-4.o +obj-$(CONFIG_NLS_ISO8859_5) += nls_iso8859-5.o +obj-$(CONFIG_NLS_ISO8859_6) += nls_iso8859-6.o +obj-$(CONFIG_NLS_ISO8859_7) += nls_iso8859-7.o +obj-$(CONFIG_NLS_ISO8859_8) += nls_cp1255.o +obj-$(CONFIG_NLS_ISO8859_9) += nls_iso8859-9.o +obj-$(CONFIG_NLS_ISO8859_13) += nls_iso8859-13.o +obj-$(CONFIG_NLS_ISO8859_14) += nls_iso8859-14.o +obj-$(CONFIG_NLS_ISO8859_15) += nls_iso8859-15.o +obj-$(CONFIG_NLS_KOI8_R) += nls_koi8-r.o +obj-$(CONFIG_NLS_KOI8_U) += nls_koi8-u.o nls_koi8-ru.o +obj-$(CONFIG_NLS_UTF8) += nls_utf8.o +obj-$(CONFIG_NLS_MAC_CELTIC) += mac-celtic.o +obj-$(CONFIG_NLS_MAC_CENTEURO) += mac-centeuro.o +obj-$(CONFIG_NLS_MAC_CROATIAN) += mac-croatian.o +obj-$(CONFIG_NLS_MAC_CYRILLIC) += mac-cyrillic.o +obj-$(CONFIG_NLS_MAC_GAELIC) += mac-gaelic.o +obj-$(CONFIG_NLS_MAC_GREEK) += mac-greek.o +obj-$(CONFIG_NLS_MAC_ICELAND) += mac-iceland.o +obj-$(CONFIG_NLS_MAC_INUIT) += mac-inuit.o +obj-$(CONFIG_NLS_MAC_ROMANIAN) += mac-romanian.o +obj-$(CONFIG_NLS_MAC_ROMAN) += mac-roman.o +obj-$(CONFIG_NLS_MAC_TURKISH) += mac-turkish.o +obj-$(CONFIG_NLS_UCS2_UTILS) += nls_ucs2_utils.o -- cgit v1.3.1