]> git.baikalelectronics.ru Git - kernel.git/commit
static_call: Fix static_call_update() sanity check
authorPeter Zijlstra <peterz@infradead.org>
Thu, 18 Mar 2021 10:31:51 +0000 (11:31 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 19 Mar 2021 12:16:44 +0000 (13:16 +0100)
commit5a516e87d2c8d05c73fb43421e692d5e3aae86bf
tree8c6554263f39529cfb04901f006415d4fdb83cac
parent5ba1e55b8e66dba1daecb07c04875a31488d9664
static_call: Fix static_call_update() sanity check

Sites that match init_section_contains() get marked as INIT. For
built-in code init_sections contains both __init and __exit text. OTOH
kernel_text_address() only explicitly includes __init text (and there
are no __exit text markers).

Match what jump_label already does and ignore the warning for INIT
sites. Also see the excellent changelog for commit: f4e34a209b86
("jump_label: Don't warn on __exit jump entries")

Fixes: 1a2a2f1fc8b95 ("static_call: Add inline static call infrastructure")
Reported-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lkml.kernel.org/r/20210318113610.739542434@infradead.org
kernel/jump_label.c
kernel/static_call.c