]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
um: Give start_idle_thread() a return code
authorRichard Weinberger <richard@nod.at>
Fri, 15 Jun 2018 14:42:56 +0000 (16:42 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 02:00:08 +0000 (20:00 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836968
[ Upstream commit 7ff1e34bbdc15acab823b1ee4240e94623d50ee8 ]

Fixes:
arch/um/os-Linux/skas/process.c:613:1: warning: control reaches end of
non-void function [-Wreturn-type]

longjmp() never returns but gcc still warns that the end of the function
can be reached.
Add a return code and debug aid to detect this impossible case.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/um/os-Linux/skas/process.c

index c94c3bd70ccd797d03a53f7f9b7b5773ff274506..df4a985716eba7047cb0873fcea7fb61a57d7a80 100644 (file)
@@ -610,6 +610,11 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
                fatal_sigsegv();
        }
        longjmp(*switch_buf, 1);
+
+       /* unreachable */
+       printk(UM_KERN_ERR "impossible long jump!");
+       fatal_sigsegv();
+       return 0;
 }
 
 void initial_thread_cb_skas(void (*proc)(void *), void *arg)