linux-stable/scripts/mod
Masahiro Yamada 9435dc77a3 modpost: distinguish same module paths from different dump files
Since commit 13b25489b6 ("kbuild: change working directory to external
module directory with M="), module paths are always relative to the top
of the external module tree.

The module paths recorded in Module.symvers are no longer globally unique
when they are passed via KBUILD_EXTRA_SYMBOLS for building other external
modules, which may result in false-positive "exported twice" errors.
Such errors should not occur because external modules should be able to
override in-tree modules.

To address this, record the dump file path in struct module and check it
when searching for a module.

Fixes: 13b25489b6 ("kbuild: change working directory to external module directory with M=")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/all/eb21a546-a19c-40df-b821-bbba80f19a3d@nvidia.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
2024-12-21 12:42:10 +09:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
devicetable-offsets.c slimbus: generate MODULE_ALIAS() from MODULE_DEVICE_TABLE() 2024-09-03 12:10:39 +02:00
empty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file2alias.c modpost: improve error messages in device_id_check() 2024-11-28 08:46:02 +09:00
Makefile Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
mk_elfconfig.c modpost: detect endianness on run-time 2024-09-01 20:33:32 +09:00
modpost.c modpost: distinguish same module paths from different dump files 2024-12-21 12:42:10 +09:00
modpost.h modpost: distinguish same module paths from different dump files 2024-12-21 12:42:10 +09:00
sumversion.c sumversion: Fix a memory leak in get_src_version() 2024-10-23 16:11:13 +09:00
symsearch.c modpost: replace the use of NOFAIL() with xmalloc() etc. 2024-09-01 20:34:48 +09:00