diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c index c53370d596be6..0a3889c4f617f 100644 --- a/kernel/livepatch/transition.c +++ b/kernel/livepatch/transition.c @@ -293,11 +293,11 @@ static int klp_check_stack(struct task_struct *task, char *err_buf) */ static bool klp_try_switch_task(struct task_struct *task) { + static char err_buf[STACK_ERR_BUF_SIZE]; struct rq *rq; struct rq_flags flags; int ret; bool success = false; - char err_buf[STACK_ERR_BUF_SIZE]; err_buf[0] = '\0'; @@ -340,7 +340,6 @@ static bool klp_try_switch_task(struct task_struct *task) pr_debug("%s", err_buf); return success; - } /*