summaryrefslogtreecommitdiff
path: root/kernel/static_call_inline.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-09-04 11:08:28 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-09-06 16:29:22 +0200
commitfe513c2ef0a172a58f158e2e70465c4317f0a9a2 (patch)
treeb3f49c8908db340dc3d29e949b66a6e1856373a2 /kernel/static_call_inline.c
parent4b30051c4864234ec57290c3d142db7c88f10d8a (diff)
static_call: Replace pointless WARN_ON() in static_call_module_notify()
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: 9183c3f9ed71 ("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
Diffstat (limited to 'kernel/static_call_inline.c')
-rw-r--r--kernel/static_call_inline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/static_call_inline.c b/kernel/static_call_inline.c
index 7bb0962b5229..5259cda486d0 100644
--- a/kernel/static_call_inline.c
+++ b/kernel/static_call_inline.c
@@ -453,7 +453,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;