Skip to content

Commit 1899213

Browse files
masahir0ygregkh
authored andcommitted
modpost: fix section mismatch check for exported init/exit sections
commit 2843879 upstream. Since commit f02e8a6 ("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: f02e8a6 ("module: Sort exported symbols") Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dc5170a commit 1899213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mod/modpost.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ static const struct sectioncheck sectioncheck[] = {
11151115
},
11161116
/* Do not export init/exit functions or data */
11171117
{
1118-
.fromsec = { "__ksymtab*", NULL },
1118+
.fromsec = { "___ksymtab*", NULL },
11191119
.bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
11201120
.mismatch = EXPORT_TO_INIT_EXIT,
11211121
.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },

0 commit comments

Comments
 (0)