diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-06-11 03:32:30 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-29 08:59:54 +0200 |
commit | 959bbaf5b7a9cc5504b88e3a5b87a11937df6366 (patch) | |
tree | 8a321540335bee8d5933979590e6a8e0c712887c | |
parent | c980392af1473d6d5662f70d8089c8e6d85144a4 (diff) | |
download | linux-stable-959bbaf5b7a9cc5504b88e3a5b87a11937df6366.tar.gz linux-stable-959bbaf5b7a9cc5504b88e3a5b87a11937df6366.tar.bz2 linux-stable-959bbaf5b7a9cc5504b88e3a5b87a11937df6366.zip |
modpost: fix section mismatch check for exported init/exit sections
commit 28438794aba47a27e922857d27b31b74e8559143 upstream.
Since commit f02e8a6596b7 ("module: Sort exported symbols"),
EXPORT_SYMBOL* is placed in the individual section ___ksymtab(_gpl)+<sym>
(3 leading underscores instead of 2).
Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL
and __init/__exit.
Fix the .fromsec field.
Fixes: f02e8a6596b7 ("module: Sort exported symbols")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | scripts/mod/modpost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 79aef50ede17..e48742760fec 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1119,7 +1119,7 @@ static const struct sectioncheck sectioncheck[] = { }, /* Do not export init/exit functions or data */ { - .fromsec = { "__ksymtab*", NULL }, + .fromsec = { "___ksymtab*", NULL }, .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, .mismatch = EXPORT_TO_INIT_EXIT, .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |