livepatch: Remove duplicate warning about missing reliable stacktrace support [Linux 5.3]

This Linux kernel change "livepatch: Remove duplicate warning about missing reliable stacktrace support" is included in the Linux 5.3 release. This change is authored by Petr Mladek <pmladek [at] suse.com> on Tue Jun 11 16:13:20 2019 +0200. The commit for this change in Linux stable tree is ac59a47 (patch).

livepatch: Remove duplicate warning about missing reliable stacktrace support

WARN_ON_ONCE() could not be called safely under rq lock because
of console deadlock issues. Moreover WARN_ON_ONCE() is superfluous in
klp_check_stack(), because stack_trace_save_tsk_reliable() cannot return
-ENOSYS thanks to klp_have_reliable_stack() check in
klp_try_switch_task().

[ mbenes: changelog edited ]
Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 kernel/livepatch/transition.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index cb85dae..3c764e7 100644
--- a/kernel/livepatch/transition.c
+++ b/kernel/livepatch/transition.c
@@ -259,7 +259,6 @@ static int klp_check_stack(struct task_struct *task, char *err_buf)
    int ret, nr_entries;

    ret = stack_trace_save_tsk_reliable(task, entries, ARRAY_SIZE(entries));
-   WARN_ON_ONCE(ret == -ENOSYS);
    if (ret < 0) {
        snprintf(err_buf, STACK_ERR_BUF_SIZE,
             "%s: %s:%d has an unreliable stack\n",

Leave a Reply

Your email address will not be published. Required fields are marked *