]> git.hungrycats.org Git - linux/commit
modpost: disallow *driver to reference .meminit* sections
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 22 Oct 2023 17:06:06 +0000 (02:06 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:32:58 +0000 (10:32 +0100)
commit95da0b40fa8c4e15dafc5efe38d50c86ff822e5b
treeb49cf68748f7f37a75de1ce5d202ae5af7b59ed9
parentdb5647420fb2ea756fae82c018871265ee0ba7a1
modpost: disallow *driver to reference .meminit* sections

[ Upstream commit 50cccec15c48814765895891ca0d95d989b6a419 ]

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:

 - 54b956b90360 ("Remove __dev* markings from init.h")
 - 92e9e6d1f984 ("modpost.c: Stop checking __dev* section mismatches")

Remove the stale whitelist.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/mod/modpost.c