Skip to content

Commit 4ab9ab6

Browse files
GustavoARSilvaKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lkml.kernel.org/r/20190805195654.GA17831@embeddedor
1 parent 33920f1 commit 4ab9ab6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/ptrace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ static int set_segment_reg(struct task_struct *task,
201201
case offsetof(struct user_regs_struct, ss):
202202
if (unlikely(value == 0))
203203
return -EIO;
204+
/* Else, fall through */
204205

205206
default:
206207
*pt_regs_access(task_pt_regs(task), offset) = value;

0 commit comments

Comments
 (0)