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:58:49 +0200 |
commit | 80f0038d757eb5d129a712188258db01b747fab0 (patch) | |
tree | a38cbfd63bb3bd9c8768396a47d0f212ff169e87 /scripts | |
parent | d1359e4129ad43e43972a28838b87291c51de23d (diff) | |
download | linux-stable-80f0038d757eb5d129a712188258db01b747fab0.tar.gz linux-stable-80f0038d757eb5d129a712188258db01b747fab0.tar.bz2 linux-stable-80f0038d757eb5d129a712188258db01b747fab0.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>
Diffstat (limited to 'scripts')
-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 59011ddf8bb8..e5aeaf72dcdb 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1131,7 +1131,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 }, |