FROMLIST: modpost: Make static exports fatal

Using EXPORT_SYMBOL*() on static functions is fundamentally wrong.
Modpost currently reports that as a warning, but clearly this is not a
pattern we should allow, and all in-tree occurences should have been
fixed by now. So, promote the warn() message to fatal() to make sure
this never happens again.

Bug: 174214891
Link: https://lore.kernel.org/lkml/20201124182420.2202514-1-qperret@google.com/
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Ic1382bfa24db556161cf1a184a4d44724d7849a1
This commit is contained in:
Quentin Perret
2020-11-24 18:24:09 +00:00
parent bdcba24146
commit db78f3b149

View File

@@ -2663,9 +2663,9 @@ int main(int argc, char **argv)
for (s = symbolhash[n]; s; s = s->next) {
if (s->is_static)
warn("\"%s\" [%s] is a static %s\n",
s->name, s->module->name,
export_str(s->export));
fatal("\"%s\" [%s] is a static %s\n",
s->name, s->module->name,
export_str(s->export));
}
}