static_call: Replace pointless WARN_ON() in static_call_module_notify()
ANBZ: #12626 commitfe513c2ef0
upstream. static_call_module_notify() triggers a WARN_ON(), when memory allocation fails in __static_call_add_module(). That's not really justified, because the failure case must be correctly handled by the well known call chain and the error code is passed through to the initiating userspace application. A memory allocation fail is not a fatal problem, but the WARN_ON() takes the machine out when panic_on_warn is set. Replace it with a pr_warn(). Fixes:9183c3f9ed
("static_call: Add inline static call infrastructure") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/8734mf7pmb.ffs@tglx Fixes: CVE-2024-49954 Signed-off-by: Qinyun Tan <qinyuntan@linux.alibaba.com> Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/4892
This commit is contained in:
parent
da92b7ffa5
commit
df33362ace
|
@ -442,7 +442,7 @@ static int static_call_module_notify(struct notifier_block *nb,
|
|||
case MODULE_STATE_COMING:
|
||||
ret = static_call_add_module(mod);
|
||||
if (ret) {
|
||||
WARN(1, "Failed to allocate memory for static calls");
|
||||
pr_warn("Failed to allocate memory for static calls\n");
|
||||
static_call_del_module(mod);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue