aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-08-05 14:56:54 -0500
committerThomas Gleixner <tglx@linutronix.de>2019-08-07 15:12:01 +0200
commit4ab9ab656a6cea5257bfa31f00c922d68f7a5c2f (patch)
tree1a56807b22f7b5c8773d41dd5dedfa6e00d84b85 /arch
parent33920f1ec5bf47c5c0a1d2113989bdd9dfb3fae9 (diff)
download96b-common-4ab9ab656a6cea5257bfa31f00c922d68f7a5c2f.tar.gz
x86/ptrace: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through. Fix the following warning (Building: allnoconfig i386): arch/x86/kernel/ptrace.c:202:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (unlikely(value == 0)) ^ arch/x86/kernel/ptrace.c:206:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20190805195654.GA17831@embeddedor
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/ptrace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 0fdbe89d0754..3c5bbe8e4120 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -201,6 +201,7 @@ static int set_segment_reg(struct task_struct *task,
case offsetof(struct user_regs_struct, ss):
if (unlikely(value == 0))
return -EIO;
+ /* Else, fall through */
default:
*pt_regs_access(task_pt_regs(task), offset) = value;