Commit 9435dc7
committed
modpost: distinguish same module paths from different dump files
Since commit 13b2548 ("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: 13b2548 ("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>1 parent 5495656 commit 9435dc7
2 files changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
2030 | 2031 | | |
2031 | 2032 | | |
2032 | 2033 | | |
2033 | | - | |
| 2034 | + | |
2034 | 2035 | | |
2035 | 2036 | | |
2036 | | - | |
| 2037 | + | |
2037 | 2038 | | |
2038 | 2039 | | |
2039 | 2040 | | |
| |||
2052 | 2053 | | |
2053 | 2054 | | |
2054 | 2055 | | |
2055 | | - | |
| 2056 | + | |
2056 | 2057 | | |
2057 | 2058 | | |
2058 | 2059 | | |
| |||
2076 | 2077 | | |
2077 | 2078 | | |
2078 | 2079 | | |
2079 | | - | |
| 2080 | + | |
2080 | 2081 | | |
2081 | 2082 | | |
2082 | 2083 | | |
| |||
2194 | 2195 | | |
2195 | 2196 | | |
2196 | 2197 | | |
2197 | | - | |
| 2198 | + | |
2198 | 2199 | | |
2199 | 2200 | | |
2200 | 2201 | | |
| |||
2205 | 2206 | | |
2206 | 2207 | | |
2207 | 2208 | | |
2208 | | - | |
| 2209 | + | |
2209 | 2210 | | |
2210 | 2211 | | |
2211 | 2212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
104 | 106 | | |
105 | | - | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
0 commit comments