diff options
Diffstat (limited to 'arch/x86_64/ia32/ptrace32.c')
-rw-r--r-- | arch/x86_64/ia32/ptrace32.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c index 659c0722f6b8..d18198ed636b 100644 --- a/arch/x86_64/ia32/ptrace32.c +++ b/arch/x86_64/ia32/ptrace32.c | |||
@@ -117,6 +117,10 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 val) | |||
117 | if ((0x5454 >> ((val >> (16 + 4*i)) & 0xf)) & 1) | 117 | if ((0x5454 >> ((val >> (16 + 4*i)) & 0xf)) & 1) |
118 | return -EIO; | 118 | return -EIO; |
119 | child->thread.debugreg7 = val; | 119 | child->thread.debugreg7 = val; |
120 | if (val) | ||
121 | set_tsk_thread_flag(child, TIF_DEBUG); | ||
122 | else | ||
123 | clear_tsk_thread_flag(child, TIF_DEBUG); | ||
120 | break; | 124 | break; |
121 | 125 | ||
122 | default: | 126 | default: |
@@ -371,8 +375,10 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) | |||
371 | ret = -EIO; | 375 | ret = -EIO; |
372 | if (!access_ok(VERIFY_READ, u, sizeof(*u))) | 376 | if (!access_ok(VERIFY_READ, u, sizeof(*u))) |
373 | break; | 377 | break; |
374 | /* no checking to be bug-to-bug compatible with i386 */ | 378 | /* no checking to be bug-to-bug compatible with i386. */ |
375 | __copy_from_user(&child->thread.i387.fxsave, u, sizeof(*u)); | 379 | /* but silence warning */ |
380 | if (__copy_from_user(&child->thread.i387.fxsave, u, sizeof(*u))) | ||
381 | ; | ||
376 | set_stopped_child_used_math(child); | 382 | set_stopped_child_used_math(child); |
377 | child->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask; | 383 | child->thread.i387.fxsave.mxcsr &= mxcsr_feature_mask; |
378 | ret = 0; | 384 | ret = 0; |