Commit 60854a12 authored by Kees Cook's avatar Kees Cook Committed by Ingo Molnar
Browse files

x86/boot: Declare error() as noreturn

The compressed boot function error() is used to halt execution, but it
wasn't marked with "noreturn". This fixes that in preparation for
supporting kernel FORTIFY_SOURCE, which uses the noreturn annotation
on panic, and calls error(). GCC would warn about a noreturn function
calling a non-noreturn function:

  arch/x86/boot/compressed/misc.c: In function ‘fortify_panic’:
  arch/x86/boot/compressed/misc.c:416:1: warning: ‘noreturn’ function does return
Signed-off-by: default avatarKees Cook <>
Cc: Daniel Micay <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Cc: H. Peter Anvin <>

Signed-off-by: default avatarIngo Molnar <>
parent 121843eb
#include <linux/compiler.h>
void warn(char *m);
void error(char *m);
void error(char *m) __noreturn;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment