Skip to content

Commit 50cccec

Browse files
committed
modpost: disallow *driver to reference .meminit* sections
Drivers must not reference .meminit* sections, which are discarded when CONFIG_MEMORY_HOTPLUG=n. The reason for whitelisting "*driver" in the section mismatch check was to allow drivers to reference symbols annotated as __devinit or __devexit that existed in the past. Those annotations were removed by the following commits: - 54b956b ("Remove __dev* markings from init.h") - 92e9e6d ("modpost.c: Stop checking __dev* section mismatches") Remove the stale whitelist. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 6a4e59e commit 50cccec

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

scripts/mod/modpost.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,12 +1006,6 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
10061006
"*_console")))
10071007
return 0;
10081008

1009-
/* symbols in data sections that may refer to meminit sections */
1010-
if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
1011-
match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS)) &&
1012-
match(fromsym, PATTERNS("*driver")))
1013-
return 0;
1014-
10151009
/*
10161010
* symbols in data sections must not refer to .exit.*, but there are
10171011
* quite a few offenders, so hide these unless for W=1 builds until

0 commit comments

Comments
 (0)