On Thu, 2020-09-17 at 14:41 -0700, Nick Desaulniers wrote: > On Wed, Sep 16, 2020 at 1:19 PM Joe Perches <joe@xxxxxxxxxxx> wrote: > > On Wed, 2020-09-16 at 13:02 -0700, Nick Desaulniers wrote: > > > * (call of function with __attribute__(__noreturn__)) > > > > I guess panic counts. I count 11 of those. > > > > Are there any other uses of functions with __noreturn > > in switch/case label blocks? > > If you look at global_noreturns in tools/objtool/check.c: > 145 static const char * const global_noreturns[] = { > 146 "__stack_chk_fail", > 147 "panic", > 148 "do_exit", > 149 "do_task_dead", > 150 "__module_put_and_exit", > 151 "complete_and_exit", > 152 "__reiserfs_panic", > 153 "lbug_with_loc", > 154 "fortify_panic", > 155 "usercopy_abort", > 156 "machine_real_restart", > 157 "rewind_stack_do_exit", > 158 "kunit_try_catch_throw", > 159 }; > > Whether they occur or not at the position you ask; I haven't checked. Just fyi: Other than the 11 instances of panic, I found only a single use of any other function above in a switch/case: drivers/pnp/pnpbios/core.c:163: complete_and_exit(&unload_sem, 0); case PNP_SYSTEM_NOT_DOCKED: Found with: $ grep-2.5.4 -rP --include=*.[ch] -n '\b(?:__stack_chk_fail|panic|do_exit|do_task_dead|__module_put_and_exit|complete_and_exit|__reiserfs_panic|lbug_with_loc|fortify_panic|usercopy_abort|machine_real_restart|rewind_stack_do_exit|kunit_try_catch_throw)\s*(?:\([^\)]*\))?\s*;\s*(case\s+\w+|default)\s*:' *