diff options
| -rw-r--r-- | arch/s390/kernel/ptrace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 13815d39f7dd..7cf464234419 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
| @@ -65,6 +65,7 @@ FixPerRegisters(struct task_struct *task) | |||
| 65 | { | 65 | { |
| 66 | struct pt_regs *regs; | 66 | struct pt_regs *regs; |
| 67 | per_struct *per_info; | 67 | per_struct *per_info; |
| 68 | per_cr_words cr_words; | ||
| 68 | 69 | ||
| 69 | regs = task_pt_regs(task); | 70 | regs = task_pt_regs(task); |
| 70 | per_info = (per_struct *) &task->thread.per_info; | 71 | per_info = (per_struct *) &task->thread.per_info; |
| @@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task) | |||
| 98 | per_info->control_regs.bits.storage_alt_space_ctl = 1; | 99 | per_info->control_regs.bits.storage_alt_space_ctl = 1; |
| 99 | else | 100 | else |
| 100 | per_info->control_regs.bits.storage_alt_space_ctl = 0; | 101 | per_info->control_regs.bits.storage_alt_space_ctl = 0; |
| 102 | |||
| 103 | if (task == current) { | ||
| 104 | __ctl_store(cr_words, 9, 11); | ||
| 105 | if (memcmp(&cr_words, &per_info->control_regs.words, | ||
| 106 | sizeof(cr_words)) != 0) | ||
| 107 | __ctl_load(per_info->control_regs.words, 9, 11); | ||
| 108 | } | ||
| 101 | } | 109 | } |
| 102 | 110 | ||
| 103 | void user_enable_single_step(struct task_struct *task) | 111 | void user_enable_single_step(struct task_struct *task) |
