diff --git a/kernel/jump_label.c b/kernel/jump_label.c index c58f83e5ee2f..38a0c2648db3 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -388,7 +388,9 @@ static bool jump_label_can_update(struct jump_entry *entry, bool init) return false; if (!kernel_text_address(jump_entry_code(entry))) { - WARN_ONCE(1, "can't patch jump_label at %pS", (void *)jump_entry_code(entry)); + WARN_ONCE(!jump_entry_is_init(entry), + "can't patch jump_label at %pS", + (void *)jump_entry_code(entry)); return false; }