From 1731b011080077c9fdc7b91d7ef1acf88d48c124 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 1 Dec 2020 19:34:16 +0900 Subject: [PATCH] UPSTREAM: modpost: turn missing MODULE_LICENSE() into error Do not create modules with no license tag. Signed-off-by: Masahiro Yamada Bug: 176428324 Change-Id: Iab31389b56545baa6d54c59b7ff2fc72c6c1876e (cherry picked from commit 1d6cd39293602e990b016994e51956eded35da7c) Signed-off-by: Melody Olvera --- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index b808716e5b50..7ef250bf1af2 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2015,7 +2015,7 @@ static void read_symbols(const char *modname) if (!mod->is_vmlinux) { license = get_modinfo(&info, "license"); if (!license) - warn("missing MODULE_LICENSE() in %s\n", modname); + error("missing MODULE_LICENSE() in %s\n", modname); while (license) { if (license_is_gpl_compatible(license)) mod->gpl_compatible = 1;